Ruby, Tools

Cleaning Up Book Records Under Kindle Documents Folder

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 like me who doesn’t know much about ruby, 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

Drag the documents folder into terminal if you don’t know what the heck its full path is supposed to be.

Standard