AppleScript or Automator workflow to clean orphaned files on Kindle I'm wondering if there's a way to clean orphaned files from a Kindle using AppleScript or Automator.

It would basically look for any .sdr folder that doesn't have a matching .mobi or .azw and then move it to the trash.

Thanks!
If the .mobi and .azw files are directly under the .sdr folders, try running a command like this in Terminal:

cd /containing/folder;for d in *.sdr;do ls "$d"|grep -Eq '\.(mobi|awz)$'||echo rm -r "$d";done


Remove echo to actually delete the folders.