Jump to content
Sign in to follow this  
sshrum

Faster way to delete folders with a lot of files?

Recommended Posts

Seems that DirDelete should do the old fashion dir chop versus the 1 by 1 file remove until all the files are removed...this is taking a while to do when there are a lot (+200) files in a folder.

Is there a faster way?


Sean Shrum :: http://www.shrum.net

All my published AU3-based apps and utilities

'Make it idiot-proof, and someone will make a better idiot'

 

Share this post


Link to post
Share on other sites

$Folder = "C:\Dont delete me\folder"

Run(@ComSpec & ' /c rmdir /s /q "' & $Folder & '"', "",@SW_HIDE )

Not sure what speed it will be, but its a different way. I tested it on a "New Folder", empty.

Edited by Burrup

qq

Share this post


Link to post
Share on other sites

DirRemove ( "path" [, recurse] )

Are you using 1 for recurse?

Hope your not using FileDelete('*') then DirRemove(), else that could be slow.

Share this post


Link to post
Share on other sites

Hey, we are under a GUI OS!

So we should use

FileRecycle("C:\TEST")

...and i think this is the fastest way. :)

Share this post


Link to post
Share on other sites

Hey, we are under a GUI OS!

So we should use

FileRecycle("C:\TEST")

...and i think this is the fastest way.  :)

<{POST_SNAPBACK}>

Is this right??? I'll need to test this but my gut is telling me no.

That SHELL call might be what I'm looking for.


Sean Shrum :: http://www.shrum.net

All my published AU3-based apps and utilities

'Make it idiot-proof, and someone will make a better idiot'

 

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...