Welcome Guest

Pages: 1
Deleting empty folders
SnowdogPostFebruary 18, 2024, 05:20
Pro
Posts: 361
Registered:
March 15, 2022, 17:12
Normal topicDeleting empty folders

Here's another silly one...

I have a 67 disc box set that had all the tracks for each disc inside a folder inside another folder. I used the action to "move files up one folder & delete empty folder", but there was a little text file inside each folder, so the folders are still there. I used the finder to search & then delete all of the text files & I now have 67 empty folders that I'd rather not delete one at a time.

Is it possible to have an action that simply finds empty folders & deletes them without moving any files?

It would save me ages & would come in handy for other occasions when I've made a similar balls up.
Image

2MR2PostFebruary 18, 2024, 13:02
Avatar photo
Administrator
Posts: 2364
Registered:
August 23, 2012, 19:27
Normal topicDeleting empty folders

Everything is possible 🙂

Download the following action:

https://2manyrobots.com/actions/Delete-Visually-Empty-Folders.zip

The action is called Delete Visually Empty Folders

Note that the word visually is in the title as a folder which contains only hidden files, is considered empty and will be deleted. If you've ever opened a folder in the Finder it will contain a hidden file named .DS_Store.

When prompted, select a folder. All folders in or under the selected folder (including the selected folder) will be deleted if they are empty. The action is smart in the sense that if a folder becomes empty due to deleting subfolders, it will be deleted.

SnowdogPostFebruary 18, 2024, 16:25
Pro
Posts: 361
Registered:
March 15, 2022, 17:12
Normal topicDeleting empty folders

Fabulous!

Pages: 1
Mingle Forum by Cartpauj | Version: 1.1.0beta | Page loaded in: 0.023 seconds.