With the amount of documents that go in and out of my kindle, the documents folder is constantly left in a rumpled state–the book record
*.sdr files scatter all over the place. I wonder why the kindle system can’t just delete the record file when the book is deleted?
Finally I decided that I’ve had enough of deleting and wrote a ruby script to deal with the mess.
Grab it here.
For anyone who doesn’t know much about ruby, you run the script by running
ruby clean_up_kinde_documents_dir.rb in Terminal. If your Kindle Documents folder is not
"/Volumes/Kindle/documents", use it like this:
$ ruby clean_up_kinde_documents_dir.rb /whatever/full/path/to/documents
If you have no idea what this full path is, you can always drag this documents folder into terminal, on OSX.