iTunes Hints & Tips

CleanDeadArt

CleanDeadArt V1.0.0.14Download

This script is licensed under the GNU GPLv3. In summary, it is free to download, use, and modify.

Description
A script to tidy the orphaned artwork & folders that may get left behind if you've ever used Windows Media Player and subsequently let iTunes or another media manager reorganise your music.

Details
The script will search through your media folders looking for those that contain only jpg, gif or bmp images, and/or desktop.ini or Thumbs.db files. These hidden files are often created automatically by Windows Media Player & Windows Explorer, but may not always be moved or deleted if iTunes or other media managers reorganise the folder structure to reflect changes in your library. Where only these types of files are found CleanDeadArt will unhide and move the files to a new archive location and will delete any completely empty directories that it finds. You can check through the archived folders before deleting in case they contain images that are missing from your library.

The thumbnail view under Windows Vista and later doesn't have quite the same look, but browsing artist folders under Windows XP can seem a little bare wherever there is only one album by an artist. I've managed this by hand in the past but as I was working on the script I thought it would be nice to include this feature. If you subsequently add another album by the same artist the script will remove any "promoted" artwork next time you run it.

Additional optional features include setting the hidden attribute for album artwork if not set, not archiving read-only files, reporting on album folders without Folder.jpg artwork (I use another script to add artwork to all my album folders) and, for artists with only one album, the "promotion" of the album artwork into the artist folder, or optionally the removal of Folder.jpg artwork. Folders containing an Ignore.txt file will be ignored, as will special folders in iTunes: Album Artwork, Automatically Add to iTunes, Downloads, and those holding iTunes LPs & Extras.

Updated to archive any .DS_Store or ._* files that can occur as a result of copying files from Mac OS X to Windows. The script now also cleans out any Desktop.ini & Thumbs.db files, and will archive any Windows Media Player art images of the form AlbumArt_{<GUID>}_Large.jpg, AlbumArt_{<GUID>}_Small.jpg, or AlbumArtSmall.jpg.

Why have this...   when you can have this?
 

Useage
Download the file to your computer and double-click to execute. Choose the media folder that you want to scan for dead or orphaned artwork, then choose a folder for this to be archived to. Depending on the size of your library it may take a few minutes to scan through all the folders. There is no progress indicator so please be patient, a dialog will indicate when the process completes and provides a summary of all actions taken.

Options
The script contains options to archive rather than delete empty folders and promote artwork where there is a single album. There are also several debugging flags which can control reporting on each type of activity the script performs, archiving art, removing empty folders etc. For each report you can chose to turn off future reporting for that task/run or press cancel to abort the script. The published script has all options & reports enabled but they can be turned off by modifying the opt= & dbg= lines in the script. For example, to disable the "Promotion" feature, which has no real benefit after Windows XP, change opt =3 into opt=1.

Disclaimer
Although I have tested this script thoroughly I make no representations as to its suitability for your purposes. Please ensure you have a backup of your media folders before running this script on your system.