Setting the thumbnail image for folders in Konqueror and dolphin

If you manage your music on your Linux/KDE desktop and care about album covers you might find this simple script useful. It checks the current directory recursively for "folder.jpg"-files, converts them to ".folder.png" files and creates a ".directory"-file.
The result is a thumbnail for each folder when browsing the directory.
In addition nasty Windows and Mac OS X files (Thumbs.db & .DS_Store) are being removed.

What you need:
  • Bash
  • ImageMagick
How to use:
$> cd /dir/to/process
$> /path/to/script.sh

Valid CSS! Valid XHTML 1.1