Jump to content
CCleaner Community Forums
Sign in to follow this  
jjthomas

Remove Empty Directories

Recommended Posts


I've searched on how to remove empties directories.  The instructions for Windows 10 do not work, I am not given the option to put in the "file size."  I could not figure out how to do so in CCleaner.  I did see some discussion on why it is not built into CCleaner and I appreciate that.

My situation is I have multiple copies of my drive due to using rsync and FileCopy.  CCleaner does a great job or removing the duplicate files, but leaves behind a hundred or more empty directories.  I want to remove the empty directories on the backup drives.  Is there a way I can do that within CCleaner?

Thank you.

-JJ, a recovering hoarder.

Share this post


Link to post
Share on other sites

It is a duplicate file finder, so you may have to do directories manually, using either Windows File Explorer, or 'rmdir' in the command window, or 'remove-items' in powershell.

rmdir (can be shortened to 'rd') will not remove folders that contain files.
https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/rd

remove-items in powershell will also check if the folder is empty.
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/remove-item?view=powershell-7

Both methods support wildcards, which should be used with care.

Sorry if those are too technical, if you are no comfortable with using them then to be safe(r) use File Explorer and delete the empty directories after checking that they are empty.

 

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  

×
×
  • Create New...