Michael36 Posted September 29, 2005 Posted September 29, 2005 Hi all would anyone know of a example of file searching i need to search for a file on my drive would there be a way to make this example script search all of c drive thank you michael $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)
B3TA_SCR1PT3R Posted September 29, 2005 Posted September 29, 2005 (edited) you could use DOS $r = _RunDOS("dir C:\ /b /s | find "*insert file name here*" >> C:\List.txt") While 1 $x = FileReadLine("C:\List.txt") MsgBox(0,"Found:",$x) WEnd i think thats right syntax not sure thou ..or you could use: $x = _FileCountLines("C:\List.txt") For 1 To $x $z = FileReadLine("C:\List.txt",$x) Next Edited September 29, 2005 by B3TA_SCR1PT3R [right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right]
w0uter Posted September 29, 2005 Posted September 29, 2005 stop using temp files and start using STD I/Ohttp://www.autoitscript.com/forum/index.ph...ndpost&p=111996 My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll
Michael36 Posted September 29, 2005 Author Posted September 29, 2005 ok thank you i wil ltry to come up with something in all the info you gave me michael
LxP Posted September 30, 2005 Posted September 30, 2005 In case you haven't had much luck, w0uter has written a function that will do what you describe. You'll need the beta if you don't have it already.
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