DarkNecromancer Posted December 15, 2004 Share Posted December 15, 2004 Hya guys um i'm having trouble making a directory search function.I know all about the Filefind and those but i'm having a hard time creating a working function with it. Ok heres what i'm trying to do. I want to have a function that will scan a folder and every subfolder looking for .exes. Easy enough but i can only get it up to the point where it finds the first folder. I dont think my codes going to cut it but i'll include it anyway. expandcollapse popup$search = FileFindFirstFile("FOLDER TO SEARCH\*.*") ; Check if the search was successful If $search = -1 Then Exit EndIf $core = (FOLDER STUB) While 1 $file = FileFindNextFile($search) If @error Then ExitLoop $righttext = StringRight ( $file, 4 ) $swing = StringLeft ( $righttext, 1 ) If ($file <> ".") Then If ($file <> "..") Then If ($file <> ".DS_Store") Then If ($file <> "Thumbs.db") Then If ($swing == ".") Then Msgbox(4096, "File:", $file) ElseIf ($swing <> ".") Then $newsearch = FileFindFirstFile(""& $core & $swing & "") ; Check if the search was successful If $search = -1 Then Exit EndIf While 1 Else MsgBox(4096, "Error", "Unable to determine the file type!") EndIf EndIf EndIf EndIf EndIf WEndWell i hope you guys see what i'm try to do and can help me out :-\ Link to comment Share on other sites More sharing options...
Developers Jos Posted December 15, 2004 Developers Share Posted December 15, 2004 Don't think your if's are making much sense here. There is also a While 1 all by itself somewhere in the middle.On My Autoit3 Stuff there is a http://www.autoitscript.com/fileman/users/jdeb/scriptlets/findfiles.au3 ... maybe that helps ..... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
ezzetabi Posted December 15, 2004 Share Posted December 15, 2004 You may also like.http://www.autoitscript.com/forum/index.ph...wtopic=5458&hl= Link to comment Share on other sites More sharing options...
DarkNecromancer Posted December 15, 2004 Author Share Posted December 15, 2004 lol yeah the readon why all that doesn't make much sense is because i don't really know how to go about coding it. Well those were what i needed. Thanks alot guess your alot of help 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