Sep 13, 2006 I have a normal sized MP3 collection on my computer and I let Windows Media Player
take care of arranging the MP3 and WMA files in the folders based on the media information
in the ID3 tags. In my music folder, there is a folder per artist, and in each of
them there is a folder per album which then contains the actual MP3 or WMA files.
That adds up to a great number of folders.
When I delete a song from within Windows Media Player, the file is deleted from disk
but the folder is not. Over time that leaves a lot of empty folders and folders that
only contain album art. To look through all the folders to see if they could be deleted
is too big a task, so I had to come up with a little C# program that could help me.
The program searches a given folder for empty subfolders or subfolders containing
certain file types. It can also look for folders that don’t have certain file types
which is exactly what I needed to clean my music library. It will iterate through
all my music folders and remove those without any .mp3 or .wma files in it. You can
define your own file types to search for or choose the predefined ones as you can
see from the screenshot.

It doesn’t actually delete the folders; it just moves them to a new folder so nothing
extremely unfortunate will happen. It does not remove system-, hidden- or read-only
files and folders. After the folders have been moved, you can then delete them yourself.
The program Folder Cleaner requires .NET Framework 2.0. It is a standalone application
that doesn’t need to be installed. Don’t worry, its virus and spyware free. The code
is only 300 lines including comments. If you are interested in the source, just let
me know. If enough people want it, then I'll add it to this post for everybody to
download.
The program comes as is, and I can not be held responsible for its use. Use with caution.
Download
Folder
Cleaner.zip (9,12 KB)
FolderCleanerSource.zip
(113,55 KB)
* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!