>I know this has been posted before, but I cannot locate it using the search feature for some reason. I need the ability to search an entire drive for a specific file 'archeadr.dbf' and it needs to function on Win95, Win98, Win2k, and WinXP without having to install WSH or anything else. Will an API function work?
>
>Any ideas anyone?
>
>TIA,
Tracy,
You can use filer.dll that comes with VFP.
oFiler = CREATEOBJECT('Filer.FileUtil')
oFiler.SearchPath = "C:\"
oFiler.FileExpression = 'eula.txt'
oFiler.SubFolder = .T.
WAIT WINDOW NOWAIT "Searching for '" + oFiler.FileExpression + "'. Be patient ..."
? oFiler.Find(0)
WAIT CLEAR
? oFiler.Files.Count
FOR i=1 TO oFiler.Files.Count
? oFiler.Files.Item(i).Name
?? " -", oFiler.Files.Item(i).Path
ENDFOR
--sb--