View Single Post
Old 10-12-2012, 09:41 PM   #1
jebradley
Member
jebradley began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Dec 2011
Device: none
deleting corrupted directories

I had a Calibre Library that was corrupted during copying of that library when I ran out of filespace on the receiving flash drive. Calibre reports that the library is ok when running a check library, but with many of the 'books' now listed, the ebook format is no longer present in the directory, only the cover.jpg and metadata file. Unfortunately, with a 4000+ "book" library, I don't want to go through the listing one at a time and deleting those that don't have an ebook present. I am running Calibre 0.9.2 on Ubuntu 12.04. Is there a script that can be used to delete all the authors/book directories that don't have an ebook file present within them?

An example sample library is attached. It has two "books" listed, one being renamed "Example of Good Directory" and the other "Example of Bad Directory." The 'good example' has a pdf files listed, but it's actually a 2 byte text file renamed pdf so that the filesize is significantly smaller than the original. The covers have been scaled down to 100x120 or so. Running the library maintenance on this reports no errors.

Thank you.

Maybe in future versions the Library Maintenance can be changed to check if a "book" actually exists in the directory, and then gives an option to delete that book if not present.
Attached Files
File Type: zip examplelibrary.zip (18.7 KB, 83 views)

Last edited by jebradley; 10-12-2012 at 09:48 PM. Reason: Forgot to add the attachment.
jebradley is offline   Reply With Quote