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?
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,
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
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
Friedrich:
That works as advertised. :)
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!