is there a function or example that can give me the full path of a requested file???
thanks,
KevSev
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Find file Path
Started by
KevSev
, Mar 15 2002 21:32
4 replies to this topic
Posted 15 March 2002 - 21:57
FindAllFiles() returns the full path (and file name) in the third parameter. You can then use Parsepath to get the path only.
Be careful in using the findalfiles on a full disk because it can take quite a while, especially with today's disk sizes. If you can narrow down the search, it will move a lot more quickly.
Be careful in using the findalfiles on a full disk because it can take quite a while, especially with today's disk sizes. If you can narrow down the search, it will move a lot more quickly.
Posted 15 March 2002 - 22:09
this is how i am calling the FindAllFiles function
(FindAllFiles ("C:\\", "filename.exe", svResult, CANCEL)
SprintfBox (INFORMATION, "File Path", "%s", svResult);
and my messagebox is coming in blank?
i know the file is there.
am i calling this function wrong??
(FindAllFiles ("C:\\", "filename.exe", svResult, CANCEL)
SprintfBox (INFORMATION, "File Path", "%s", svResult);
and my messagebox is coming in blank?
i know the file is there.
am i calling this function wrong??
Posted 16 March 2002 - 01:14
According to the help, the first time your last parameter should be RESET. You should also check the numeric result code. Afterwards you should call the function again, but this time with CANCEL as the 4th parameter.
Posted 18 March 2002 - 11:33
Small word of caution here, as I learned this the hard way:
FindAllFiles will search the entire specified directory and sub-directory structure.
This means that if you specify "C:\" as startdirectory, and 'filename.exe' does not exist, IS will search your entire disk ! This will take some time and during the search, your setup will appear to hang.
So be carefull using FindAllFiles this way.
Ide
FindAllFiles will search the entire specified directory and sub-directory structure.
This means that if you specify "C:\" as startdirectory, and 'filename.exe' does not exist, IS will search your entire disk ! This will take some time and during the search, your setup will appear to hang.
So be carefull using FindAllFiles this way.
Ide