Documentation files, i.e., .pdf and .txt files are deleted by default. If you want to keep them, use the “-d” or “–documents” option.
Folder-level album art files are kept by default (see below). Any other .jpg, .jpeg or .png file will be deleted or backed-up.
Note that, unless you specify the “-p” or “–purge” option, nothing will be touched. Leave those options off, and use the “-v” or “-verbose” switch, and you’ll get a list of all the files that’ll be deleted (or backed up). This lets you see in advance if you want to actually run the purge.
If you provide a BACKUP PATH, then instead of just deleting files, they’ll be moved to that backup folder, and will retain the same directory structure that they came from (so you can just merge them all back with a single drag/drop in Explorer or Finder).
Essentially, the mode of operation is that any file that isn’t on the list to keep is deleted/backed-up. This saves having to code for every possible file type or name that might wind up in a library but need to be removed. The list of files/file types to keep is both much shorter and changes infrequently.
In it’s most aggressive mode (with the “-a” option applied), it will delete ALL files that are not one of the following types (i.e. these types of files are NEVER deleted):
.aac, .aiff, .ape, .dff, .dsd, .dsf, .dxd, .flac, .iso, .m4a, .m4p, .mp3, .oga, .wav, .wma or .wmv
The “-l” or “-list-types” command will show you the file extensions the tool considers to be “music files” (always kept), “other audio files” (deleted by default, but can be kept with the “-o” or “–other-audio-files” option) and “documentation/booklets” (deleted by default, but can be kept with the “-d” or “–documents” option).
Album Art Files
These files are kept by default; using the “-a” or “–art” options will delete them:
- album.jpg
- album.jpeg
- album.png
- cover.jpg
- cover.jpeg
- cover.png
- small_cover.jpg
- small_cover.jpeg
- small_cover.png
- large_cover.jpg
- large_cover.jpeg
- large_cover.png
- folder.jpg
- folder.jpeg
- folder.png
- thumb.jpg
- thumb.jpeg
- thumb.png
- albumartsmall.jpg
- albumartsmall.jpeg
- albumartsmall.png
- albumartmedium.jpg
- albumartmedium.jpeg
- albumartmedium.png
- albumartlarge.jpg
- albumartlarge.jpeg
- albumartlarge.png
If you have an “album art” file that uses a different file name than one of the above, this tool will ALWAYS delete it.
The primary intent was to clean up libraries for use on devices with limited storage - the use cases for which don’t usually include reading documentation/booklets (if, indeed, the player can even expose them).