Link to home
Create AccountLog in
Avatar of RickEpnet
RickEpnetFlag for United States of America

asked on

Quickly delete a complexed directory structure

Is there a easy and quickly delete a complexed directory structure.

I have a program that creates... I am not sure but it must be thousands of folders and places data in them. If I use CMD prompt with the del /s it takes forever.

The OS is Windows 2008 R2
Avatar of Krzysztof Pytko
Krzysztof Pytko
Flag of Poland image

Hi,

what about

rd command with /S switch ?

should work as old dos deltree command

Regards,
Krzysztof
Avatar of RickEpnet

ASKER

That takes forever too. I was hoping someone knew of some software that can help.
Probably you have a lot of files in many folders, so during delete process it takes SOME time ;)
You can try with PowerShell

Krzysztof
You can use some third party software which I don't recommend any of them for server.

If they are in different drive from system, copy the rest of files and folders and do format the drive. otherwise, because it needs go through the FAT, takes that much.
ASKER CERTIFIED SOLUTION
Avatar of Qlemo
Qlemo
Flag of Germany image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
If you don't have to check these folders first why not create an automated task to do the deleting for you--that way even if it does take a long time it is not your time. Create a batch file with
rd c:\FileFoderName /s/q
in it and schedule it to run daily, hourly, weekly--whatever suites your needs.
Thank you for the comment but this is not a trim issue these files and folders are part of the backup / deduplication software and deleting any part of it will break the process. I am only deleting now because I am starting a new.
Oh, so its a one time deletion?
Yes
So, it probably done by now or do you still need, want help?
Well not really done. I have to blow this away every once in a while (testing). I am just going to change the way I do it. I am going to make a volume with only that on it so I can blow the whole volume away not have to worry about the file / folder structure.  
If you can do a quickformat, that is indeed the quickest option.