GP SoftwareTwitter
Opus FAQsManualCommandsObjects

Remove empty folders (I know this isn't new on the forum)

Simple question:
I would like to view empty folders and subfolders, so that I can delete empty folders.

However I cant see "size" populated in my view. Running latest version of DO with default settings.

Also, I would opt for a function to remove all empty folders from a menu item. This has been discussed but actually I am lost in the discussion thread. Whats the current status or resolution for this?

See attached screenshot.


To make things easier, I'd suggest the following app:

I have a button on my DO toolbar that opens Remove Empty Directories.

1 Like

You can do it easily in Opus as well. There are several threads with different methods on the forum.

If you have trouble following instructions on how to do something, please link to them so which know which thread you're looking at, and also tell us which part you're having trouble understanding. We can provide mode detail if we know where you're stuck.

Folder sizes are only calculated when you ask for them, by default. (Since it can involve a lot of disk access.) Push Ctrl-K (or Ctrl-L in older configs) or use Edit > Calculate Folder Sizes.

You can also make calculation automatic (see the FAQs for details) for some or all folders, but I wouldn't advise doing that outside of things like a downloads folder where you know there won't be a lot of sub-folders to dig through every time the sizes are calculated.

Thanks, I already use RED, but I thought this would be perfect suitable for integration in DO. But you have done already. Could you tell me how to place a button to RED on the toolbar? (I am new to DO)

I would prefer the easiest method. Since I am new to DO and need to become familiair with it. Easiest approach for me would be to implement a function under Tools (which is already on the menubar), but I guess it isn't that simple :wink:
Since I am new to DO I cant write any script or filters etc.

That worked, thanks!!

If you want the easiest method that doesn't involve setting up a toolbar button or filter, then you can use Tools > Find Files to locate any empty folders:

Then delete them from the results.

If you use Ctrl-K in the results to calculate the sizes (which should be very quick), you may see some folders are "empty" (literally nothing is inside them) and others are "0 bytes" (may have 0 byte files or other folders with nothing or 0 byte files below them). You may only want to delete the ones which are 0 bytes.

2020-01-28 16-58-03 Clipboard Image

Empty folders don't cause any harm, though, so I don't know why so many people obsess over finding and deleting them all, or what is creating them for that matter. :slight_smile:

More automated solutions are also possible, but require setting up a toolbar button. Creating toolbar buttons is easy, though:

Thanks again!

For me, its more the mental aspect that counts: working with a clean desk feels better. Same counts for a "clean hard disk"...

For me, the need to delete empty folders usually relates to the project that I'm working on and the need to reduce the number of folders that need to be processed. Once I've processed the files in a folder, I want to get rid of that folder so that I'm not continuously clicking into that folder only to find it's empty. But I often process dozens (or more) of folders at a time, thus leaving behind a bunch of empties.

Hi everyone! The method im using is with label filters. I have a button, if i toggle it, it will enable a created label filter which colores the folder name or background of empty folders. This is not a solution where you would want to see ONLY empty folders.

  1. Settings - Preferences - Fav and Recent - Labels
    Here you create a label with coloring (i call it EMPTYLABEL)

  2. Settings - Preferences - Fav and Recent - Label Assignments
    Here you create a label filter: (i call it EMPTYFOLDER)
    Type match folders
    Size match is equal to zero
    Assign the already created EMPTYLABEL

  3. Toolbar rightclick - Customize - New Button

So every time i need to highlight empty folders i click on this button and DOpus colors the background of the folders.