How to scan and delete all folders not containing music?
August 17, 2021 7:45 PM   Subscribe

Since getting Spotify, I've found that I don't really have a need for the many mp3's that I've downloaded since the days of Napster. I went through my collection and deleted many many mp3s. However, I'm now left with several folders that are empty or that contain a few images of album artwork or text files with details about the album. Is there an easy way to scan through all folders remaining on my external hard drive and delete any that don't contain any music?
posted by NoneOfTheAbove to Computers & Internet (5 answers total) 1 user marked this as a favorite
One way to do it would be to sort/filter by folder size, & delete all the ones under 1MB.
size:tiny kind:folder is in the right ballpark, a tool like Treesize might alternately do the trick, if you're Linux-handy du -hs * | sort -hr would list sizes and then from there you could bash together the rest...
posted by CrystalDave at 8:15 PM on August 17, 2021

Step 1: get Voidtools Everything. Add your location to the index and do a limited search for '*.mp3' + whatever other files you want to delete; delete all.

Step 2: get DelEmpty and point it at the same location.

Step 3: There is no step 3.
posted by jmfitch at 8:16 PM on August 17, 2021

Response by poster: I guess I should also mention I'm using Windows 10, since that might be relevant.
posted by NoneOfTheAbove at 8:35 PM on August 17, 2021 [1 favorite]

Not the most efficient way to do it, but you could simply copy all of the music files out to a different location by searching for *.mp3 etc., delete all the existing folders, and then run all the music files through a tool that would sort them back out into folders (if desired).
posted by Candleman at 9:33 PM on August 17, 2021

Seconding Voidtools Everything - because the built in Windows search is not as good as it could be. This will let you find all the files by type, or just all the files in those folders and you can see them all at once to decide which ones you really want. If you would want to keep the artwork or text files for some of the mp3 that you kept, then you could sort the results by folder and then manually remove the files with no matching music in them.

I use a tool called Remove Empty Directories to find and delete empty folders.
posted by soelo at 10:14 PM on August 17, 2021 [1 favorite]

« Older How do I get specific logs.   |   Three days in Nuuk Newer »
This thread is closed to new comments.