Echo values and search folders

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • tawi
    Forum Member
    • Mar 2002
    • 15

    Echo values and search folders

    Hi,

    I have two problems:

    1. I need to search for some special folders, nameley

    D:\Programme\JavaSoft\JRE\1.3.1_01
    D:\Programme\JavaSoft\JRE\1.3.1_02

    and so on.
    So I tried "File Information" with the following values:

    File information to collect "Existence (TRUE if file exists)"
    Variable name "%locJRE13101%"
    Default value "Default"
    File name "%SysDrv%\%ProgramFiles%\JavaSoft\JRE\1.3.1_01 "

    The same I did for other folders. I know that theese folders exist. But my generated setup seems not to find them and so no files are copied there. So my first question is if my values are correct.

    the second question also belongs to this problem. How can I echo the values stored in %SysDrv% etc? I want to know if everything is correctly wstored in the variables.

    Any hints for me?

    Thank you in advance.

    tawi


  • Darryl
    Indigo Rose Staff Member
    • Jul 2001
    • 1908

    #2
    Re: Echo values and search folders

    The easiest method for debugging the contents of variables is using Show Message Box actions with the variable names as the text to display. At runtime the variable's contents will be displayed. You could also display it on screens as an alternate method.

    This may be just to make it clear in the post, however make sure you don't have quotes around the text in the Default Value and File name fields. That will cause it to fail.

    Other than that, make sure that the variables are expanding to what you are looking for.

    One other thing to do is turn on the error notification for your actions. On each action you will see an ON ERROR tab where you can set what level of error notification you want to have. While debugging it is very useful to have it set to "Verbose" so you can see why it may be failing if at all.

    Hope that helps.

    Comment

    • tawi
      Forum Member
      • Mar 2002
      • 15

      #3
      Re: Echo values and search folders

      Hi,

      Thnk you for your reply.

      I have one more question: How can I search for a folder and store the path to that folder in a variable? I need to find some folders and then copy some files into them. Using "file information" with "TRUE if file exists" just gives me TRUE or FALSe but I need the path...

      Greetings,

      tawi

      Comment

      • Darryl
        Indigo Rose Staff Member
        • Jul 2001
        • 1908

        #4
        Re: Echo values and search folders

        I'm sorry, there is currently no way to search for a folder, only a file. Are there any files within that folder that you know for sure will exist? If there are, you could search for a file within that folder to get a path, and then parse it to get the folder.

        Comment

        • cdemallie
          Forum Member
          • Jul 2002
          • 16

          #5
          Re: Echo values and search folders

          You may have already discovered this, but here's my two cents anyway. I believe your last line, <font color=green>"File name "%SysDrv%\%ProgramFiles%\JavaSoft\JRE\1.3.1_01 "</font color=green>, will result in the drive letter being listed twice. i.e. C:\C:\Program Files\Java...

          Comment

          • tawi
            Forum Member
            • Mar 2002
            • 15

            #6
            Re: Echo values and search folders

            Hi,

            ok, I know some files which really exist in the folder... but there are more folders in between.
            I have to detect

            D:\Programme\JavaSoft\JRE\1.3.1.01

            and a file I know is

            D:\Programme\JavaSoft\JRE\1.3.1.01\lib\security\ca certs

            Well, I can search for that file, but I don't know how to parse the path with setup factory... are there any actions available for this?

            Thank you,

            tawi

            Comment

            • tawi
              Forum Member
              • Mar 2002
              • 15

              #7
              Re: Echo values and search folders

              Hi,

              I just tried "ParsePath" from the actions tab. Seems that this could do what I want. But: does it really only store to directory hierarchies in the variable? It's only mentioned "folder1\folder2" and if I try to store more folders like "folder1\folder2\folder3\folder4" I only get the first two... I'm not sure what to try next to get my path...

              Greetings,

              tawi

              Comment

              • Darryl
                Indigo Rose Staff Member
                • Jul 2001
                • 1908

                #8
                Re: Echo values and search folders

                For the previous post, cdemallie was right, nice catch. I can't believe I didn't notice that! Anyway, as far as the Parse Path action goes, it shouldn't matter how large the directory structure is. I just did a test with the current build 6.0.1.2 and didn't have any problems parsing a drive and four folders by either getting the "drive and folder" or "folder". Make sure the result of the search is correct before you are trying to parse it.

                Comment

                Working...
                X