autoITnewbie Posted January 24, 2005 Share Posted January 24, 2005 hi, how do I scan for a file in system drive and append the path file to a text file or append it to a variable? I can do it AutoIT 2 but I couldn't figure out how to do it AutoIT3 but in AutoIT 2 I still have to use batch command to search and append it to a Text file and then using AutoIT 2 to read each line if there are more than one path. please help Many thanks Link to comment Share on other sites More sharing options...
zcoacoaz Posted January 24, 2005 Share Posted January 24, 2005 if you can do it in v2 what is the need to rewrite it in v3? [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
Josbe Posted January 24, 2005 Share Posted January 24, 2005 hi,how do I scan for a file in system drive and append the path file to a text file or append it to a variable?I can do it AutoIT 2 but I couldn't figure out how to do it AutoIT3 but in AutoIT 2 I still have to use batch command to search and append it to a Text file and then using AutoIT 2 to read each line if there are more than one path.please helpMany thanks<{POST_SNAPBACK}>Tip: You could to start with the Au2 -> Au3 Converter AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
Blue_Drache Posted January 24, 2005 Share Posted January 24, 2005 (edited) What about Do $filename = InputBox("Search","What is the filename?") If @error = 1 then Exit Until Not $filename = "" RunWait(@ComSpec & " /c " & "dir C:\ /s > C:\Temp\dir.txt") $file = FileOpen("C:\temp\dir.txt",0) If @error = -1 then MsgBox(0,"Error","File Open Error") Exit EndIf While 1 $line = FileReadLine($file) If @error = -1 then $bailout = 1 ExitLoop; EOF EndIf If Not StringInString($line,$filename) = "" Then MsgBox(0,"Found It",$line) ExitLoop Endif Sleep(10) Wend If $bailout = 1 then MsgBox(0,"Error","File Not Found") *** Untested code written off the cuff. Edited January 24, 2005 by Blue_Drache Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
ezzetabi Posted January 24, 2005 Share Posted January 24, 2005 http://www.autoitscript.com/forum/index.php?showtopic=5458 Link to comment Share on other sites More sharing options...
Blue_Drache Posted January 24, 2005 Share Posted January 24, 2005 http://www.autoitscript.com/forum/index.php?showtopic=5458<{POST_SNAPBACK}>Yeah, that works too. Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
autoITnewbie Posted January 25, 2005 Author Share Posted January 25, 2005 Many thanks! 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