monte Posted March 18, 2006 Share Posted March 18, 2006 Hello, I need to search the drive for a file and return to full path to the file found. Is there a way to do this? The code found in the manual only searches the current directory and doesn't decend into subsequent directories nor does it return the full path. Any thoughts? Thanks. ; Shows the filenames of all files in the current directory, note that "." and ".." are returned. $search = FileFindFirstFile("*.*") ; Check if the search was successful If $search = -1 Then MsgBox(0, "Error", "No files/directories matched the search pattern") Exit EndIf While 1 $file = FileFindNextFile($search) If @error Then ExitLoop MsgBox(4096, "File:", $file) WEnd ; Close the search handle FileClose($search) Link to comment Share on other sites More sharing options...
Foaman Posted March 18, 2006 Share Posted March 18, 2006 I could make a script to do this for you in Windows XP or DOS. What OS are you on, though? Do you want to just find one file, or many files? Like a que of keywords to find and report on? Link to comment Share on other sites More sharing options...
GaryFrost Posted March 18, 2006 Share Posted March 18, 2006 search in scripts and scraps for FileSearch SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
monte Posted March 18, 2006 Author Share Posted March 18, 2006 foaman, I'm running xp ( I would like it to work with 2000 as well. Thanks. gafrost, will do. Link to comment Share on other sites More sharing options...
monte Posted March 18, 2006 Author Share Posted March 18, 2006 Sorry, Foaman. I want to find just one file. Link to comment Share on other sites More sharing options...
monte Posted March 18, 2006 Author Share Posted March 18, 2006 I've tried running C:\find /I "filename" and outputting it to a file then parsing that file from within autoit, but it takes too long to run find. Any other ideas? Thanks. Link to comment Share on other sites More sharing options...
monte Posted March 18, 2006 Author Share Posted March 18, 2006 gafrost, I didn't find anything useful in scripts and scraps. Did you see something specific to my question? Link to comment Share on other sites More sharing options...
Valuater Posted March 18, 2006 Share Posted March 18, 2006 just like gafrost saidhttp://www.autoitscript.com/forum/index.ph...&st=0&p=730518) Link to comment Share on other sites More sharing options...
monte Posted March 18, 2006 Author Share Posted March 18, 2006 thanks valuater. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now