Post a reply to the thread: Locating existing file
Click here to log in
What's the name of our main installation product (in uppercase letters), directly followed by the current year?
You may choose an icon for your message from this list
Will turn www.example.com into [URL]http://www.example.com[/URL].
Re: Locating existing file Could you please send me a demo script where it does not work? All our test scripts (with drive variables) work fine in build 1354. Thank you!
Re: Locating existing file
Re: Locating existing file Friedrich: That works as advertised.
Re: Locating existing file Joe, Just checked this and it works fine here on our machines. I am using the following: Set Variable %DRIVELETTERTOTEST% to c: Set Variable %FILEFOUND% to "" Set Variable %FILEFOUND% to Search for File("FMGMASTR.EXE") Display Message Box "%FILEFOUND%\n\n%_SB_ERRORCODE%\n\n%DRIVELETTERTOT E..." -- "" FMGMASTR.EXE is in c:\general and the installer detected the file.
Re: Locating existing file Joe, I'll check this. BTW, what happens if you enter D:\ in "Path to search" (instead of %DRIVE_LETTER_TO_TEST%\) Thanks,
Re: Locating existing file I must be be missing something. Search for File function Variable %FILEFOUND% Filename FMGMASTR.EXE Path to search: %DRIVE_LETTER_TO_TEST%\ (tried without \ also) Return List of all matches is ON Debugger shows %DRIVE_LETTER_TO_TEST% to contain D: from previous GetListItem function. After execution: %SB_ERRORCODE%= empty %FILEFOUND%= empty I know there are several occurances of the FMGMASTR.exe file on this drive. Attempted to send stripped down script but zip file is too large for submission as an attachment.
Re: Locating existing file Joe, The Search for File function allows you to search for a specific file in the local or network file system and places the location in a variable. If the function succeeds, the %_SB_ERRORCODE% return value is nonzero. If the function fails, the return value is zero. Does this help?
Locating existing file I am trying to determine if a file exists anywhere on a particular drive. Ideally I need to know if this file is anywhere on the installation machine. Have looked at "If File/Folder" and "Search for File" functions but both seem to require that the path be specified. Is there a way to find a file by simply supplying C: and the filename argument?
Locating existing file
Forum Rules