speedy6 Posted May 29, 2007 Share Posted May 29, 2007 I want to search for files with te excention .fk in a folder that i choose, and delete them. How can i do that? Link to comment Share on other sites More sharing options...
Zedna Posted May 29, 2007 Share Posted May 29, 2007 (edited) #Include <File.au3> ; #Include <Array.au3> $FileList=_FileListToArray("C:\TEMP\","*.fk",1) If @Error = 0 And IsArray($FileList) Then ; _ArraySort($FileList,0,1) For $j = 1 to UBound($FileList) - 1 $name = $FileList[$j] ; FileDelete ($name) Next EndIf Edited May 29, 2007 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
speedy6 Posted May 29, 2007 Author Share Posted May 29, 2007 Beutifull, And is it also posible to go deeper in de folder. So if i say c:\temp it deletes now al the files in that folder. But what if there's a file in c:\temp\temp. Thanks a lot. Link to comment Share on other sites More sharing options...
Zedna Posted May 29, 2007 Share Posted May 29, 2007 For recursive you must use _FileSearch() or _FileListToArrayEx() functions. Search them on the forum. Resources UDF ResourcesEx UDF AutoIt Forum Search 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