Borje Posted April 26, 2011 Share Posted April 26, 2011 (edited) Hi all Is that anobody here that know some command or how to delete all directory on a drive? Example if a have a drive f: and i have folders Test1, Test2,Test3, sound, programs and I want to delete all this folders what to do? Edited April 26, 2011 by Borje Link to comment Share on other sites More sharing options...
wakillon Posted April 26, 2011 Share Posted April 26, 2011 Try For $_I = 1 To 3 DirRemove ( 'f:\Test' & $_I, 1 ) Next AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
Borje Posted April 26, 2011 Author Share Posted April 26, 2011 Thanks wakillon But this is not worked if that are others folders names, is that not possible to have wildcards? Link to comment Share on other sites More sharing options...
hannes08 Posted April 26, 2011 Share Posted April 26, 2011 Hi Borje, try reading all directorynames to an array via _FileListToArray() (see helpfile for function reference), Then you can loop through that array and delete all folders. You could also do a Quick format, if you want to delete everything on that drive. Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler] Link to comment Share on other sites More sharing options...
Borje Posted April 26, 2011 Author Share Posted April 26, 2011 Thanks Hannes This is working !!! Link to comment Share on other sites More sharing options...
hannes08 Posted April 26, 2011 Share Posted April 26, 2011 What? The quickformat? You're welcome. Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler] Link to comment Share on other sites More sharing options...
Borje Posted April 26, 2011 Author Share Posted April 26, 2011 No I use the _FileListToArray() and that works great. Link to comment Share on other sites More sharing options...
FMS Posted April 26, 2011 Share Posted April 26, 2011 can u put in the result of your script? i'm curious in how u used it for learning reasons:D whit kind regards FMS as finishing touch god created the dutch 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