Jump to content


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.
Photo

Find file Path


4 replies to this topic

KevSev

KevSev
  • Members
  • 10 posts

Posted 15 March 2002 - 21:32

is there a function or example that can give me the full path of a requested file???

thanks,
KevSev

Bill K

Bill K
  • Members
  • 21 posts

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.

KevSev

KevSev
  • Members
  • 10 posts

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??

Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

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.
user posted image

Ide Nentjes

Ide Nentjes
  • Members
  • 222 posts

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