Jump to content

Is there a way to auto-delete totally blank folders and sub-folders?


yashodharma

Recommended Posts

  • Moderators

from within CC, not that I know of.

 

personally, I'd do it from a command prompt with something like

FOR /F delims^= %A IN ('DIR/AD/B/S^|SORT/R') DO RD "%A"

if you run it from a Batch file, the %'s will need changing.

the RD command does not delete folders that aren't empty, so it should be safe - but have a backup on hand just in case. :)

 

or you could use command like XCOPY or ROBOCOPY (you don't mention what OS you have) and use the appropriate switch so empty folders aren't copied.

 

but really, there is probably little benefit.

if the empty ones are in personal folders, then you probably made them but if they are located in system folders, they are usually there for a reason.

they will either get recreated when some program runs, or some program will fail to run because an expected folder (empty or not) cannot be found.

Backup now & backup often.
It's your digital life - protect it with a backup.
Three things are certain; Birth, Death and loss of data. You control the last.

Link to comment
Share on other sites

  • Moderators

And not every empty folder should be removed as some may break a program if removed

 

ADVICE FOR USING CCleaner'S REGISTRY INTEGRITY SECTION

DON'T JUST CLEAN EVERYTHING THAT'S CHECKED OFF.

Do your Registry Cleaning in small bits (at the very least Check-mark by Check-mark)

ALWAYS BACKUP THE ENTRY, YOU NEVER KNOW WHAT YOU'LL BREAK IF YOU DON'T.

Support at https://support.ccleaner.com/s/?language=en_US

Pro users file a PRIORITY SUPPORT via email support@ccleaner.com

Link to comment
Share on other sites

  • Moderators

And not every empty folder should be removed as some may break a program if removed

 

Exactly. And it's impossible to know which program will have issues because of it. I've personally only ran across one program that vehemently refused to work after removing its always empty "AppData\ProgramName\Temp" folder.

Edited by Andavari
Link to comment
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
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.