stuka Posted August 26, 2007 Share Posted August 26, 2007 (edited) . Edited August 24, 2009 by stuka Link to comment Share on other sites More sharing options...
Paulie Posted August 26, 2007 Share Posted August 26, 2007 I don't know if recursive searching into directories is supported. It might be worth a search through example scripts though. Link to comment Share on other sites More sharing options...
xcal Posted August 26, 2007 Share Posted August 26, 2007 (edited) I had this laying around for finding files. I just modded it real quick, so it's not pretty (no error checking, function options etc), so it'll find extensions. Just run it and put in the extension you want to find (ex: jpg with no '.'). #include <array.au3> ; just for _ArrayDisplay $input = InputBox('What to Search for...', 'Find what ext? (ex: jpg)', 'ext', '', 200, 120) If @error Then Exit _ArrayDisplay(_findfile($input)) Func _findfile($ext) Local $rets[1] Local $output = Run(@ComSpec & " /c " & 'dir ' & '"' & @HomeDrive & '\' & '' & '*.' & $ext & '" /b /s', '', @SW_HIDE, 2) While 1 $stdout = StdoutRead($output) If @error Then ExitLoop $found = StringSplit(StringStripCR($stdout), @LF) For $i = 1 To UBound($found) - 1 If $found[$i] = '' Then ContinueLoop ReDim $rets[UBound($rets)+1] $rets[UBound($rets)-1] = $found[$i] Next WEnd $rets[0] = UBound($rets) - 1 Return $rets EndFunc Edited August 26, 2007 by xcal How To Ask Questions The Smart Way 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