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)

Some of my readers have been asking me how I’ve added the Windows Live Alerts functionality to this blog. I simply love this feature and I hope that it will spread to some of the blogs I read daily. It allows me to get notified about blog updates in a non-intrusive way through Messenger without having to subscribe to the RSS feeds. I already have to many RSS subscriptions.

All you have to do is to sign up, provide the link to your RSS feed and add this button to your blog. Don't worry, it's free.

Here is a link to the sign-up page at Windows Live Alerts.

You can add this blog to your Windows Live Alerts by clicking here or on the button on the right side of the webpage. Here's a screen shot from the alert i recieved through Messenger when I posted this.

Whenever you recieve an alert and decides to read the post, just click the alert and you will be taken directly to the blog.