Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How can I delete a folder that has over 100 GB of other files and folders inside it. The machine is a Windows 2003 server.

I have this command:

rmdir /s /q folder

But is it problematic to delete 100 GB all in one command? Is there a way to just delete half of the files at a time?

enter image description here

Thank You.

share|improve this question
    
There is probably a more efficient way of storing your data than lots of little files if you can possibly avoid it. –  JamesRyan Jan 24 '12 at 15:44

1 Answer 1

No, it's not problematic - your delete process is going to take a long time because you have 1.3 million files, 31,500 directories you're eliminating. That's quite a bit, and even on high end hardware will take some time. (I'd expect it to take at least 15+ minutes on Windows)

To delete half, or a partial chunk of the files is a bit more complicated because you (I/we) don't know how the files are distributed.

share|improve this answer
2  
To expound: file deletion in Windows isn't an atomic operation (for the command), so it's not trying to keep track of all the million files and then wipe them at the end. Thus removing one file at a time and doing it all in one command has no practical downfall. –  Jeff Ferland Jan 24 '12 at 15:34
    
Thank you for the insight! I am running the command on the test server that has 30 GB folder, has taken 4 minutes so far. I will post how long it takes to finish. –  joe Jan 24 '12 at 15:36
    
Finished, took 6 minutes. –  joe Jan 24 '12 at 15:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.