Find File and FIle Path

Comments

3 comments

  • Avatar
    Jeff Crystal

    Jesus, U ROCK! THANKS! I Would ask if U can walk on water but Hey fixing my code is a miracle in and of its self.

    1
    Comment actions Permalink
  • Avatar
    Jeff Crystal

    Sorry about the deletes and Edits could not get code to post correctly

    0
    Comment actions Permalink
  • Avatar
    jesus

    Hi,

    Find below a piece of code of how to do that.

    <preInstallationActionList> <findFile> <abortOnError>0</abortOnError> <baseDirectory>${windows_folder_appdata}</baseDirectory> <pattern>origin.txt</pattern> <variable>FoundFile</variable> </findFile> <readFile> <name>origin</name> <path>${FoundFile}</path> </readFile> <setInstallerVariableFromRegEx name="new_installdir" pattern="(.*)\/(.*)" substitution="\1" text="${FoundFile}"/> <setInstallerVariable name="installdir" value="${new_installdir}"/> </preInstallationActionList>

    Note that if the file is not found the findFile action will throw an error.

    Regards, Jesus

    0
    Comment actions Permalink

Please sign in to leave a comment.