Mobileread
Leftover files after delete
#1  JSWolf 09-24-2020, 06:39 AM
What files are left after an eBook is deleted using the delete function on the Kobo?

I know Kindles can end up with a lot of files and directories left over. I'm hoping Kobo doesn't do something similar.
Reply 

#2  93terp 09-24-2020, 02:56 PM
Quote JSWolf
What files are left after an eBook is deleted using the delete function on the Kobo?

I know Kindles can end up with a lot of files and directories left over. I'm hoping Kobo doesn't do something similar.
So far I haven't found any leftover files or empty folders on my Kobo following an on-device delete. That drives my crazy on the Kindle!
Reply 

#3  compurandom 09-24-2020, 05:23 PM
Possibly the generated / cached cover might be left behind.
Calibre with the KoboUtilities plugin has a feature to clean up the covers directory, but I've never _needed_ to use it, and my library has a fairly high turnover. Probably ran it once or twice.
Reply 

#4  davidfor 09-24-2020, 08:30 PM
@JSWolf: I thought you must have known the answer to this. You have stated that people should use calibre to delete books as it does the cleanup, so I assumed you must have know what was left behind.

@compurandom: The covers are cleaned up properly when you delete a book through the UI. The Kobo Utilities cleanup was written at a time when there was problem with this. And because I needed to prove what was actually happening.


But, nothing is left behind when you remove a purchased book. For sideloaded books it depends on the format. For anything that is opened using the RMSDK (epubs and PDF, don't know about other formats) there will be files in the "Digital Editions" directory. For everything else, if the last book or cover in a directory is removed, the empty directory is not removed.
Reply 

#5  DrChiper 09-25-2020, 12:05 PM
I've seen in \Digital Editions\Annotations\, sub-directories A - Z with annotation files of (by Calibre) removed books which were still left behind.

This is even more curious as I'm always manually remove all annotations in the books themselves before removing the book. Those annotations files still contained, well, "annotations".
Reply 

#6  JSWolf 09-25-2020, 09:32 PM
I don't have annotation files. I did the fix some time ago for the annotation bug where the location wasn't correct after reopening the eBook. My annotation directory is a 0 byte file.

However, I do have leftover XML files. That is one thing I eould really like Kobo Utilities to handle if it's possible.
Reply 

#7  davidfor 09-25-2020, 11:46 PM
Quote DrChiper
I've seen in \Digital Editions\Annotations\, sub-directories A - Z with annotation files of (by Calibre) removed books which were still left behind.

This is even more curious as I'm always manually remove all annotations in the books themselves before removing the book. Those annotations files still contained, well, "annotations".
When you delete a book from calibre, it does so in the same way as the device does (with the exception of cleaning up empty directories). So, it doesn't delete those files.

The files are created when the book is first opened on the device (though it might be different if you use ADE to put the book on the device). The annotations files are maintained when reading an epub. As you add and remove annotations they are changed in both the database and the file. The latter is done by the RMSDK and I doubt there is a way to turn it off. It is handled a little differently if you edit the annotations from outside a book. From memory, it updates the annotations in the database, but only updates the file when the books is opened and a merge is done.

Not removing these files does allow an epub to be deleted and then added again and the annotations not lost. But, I'll look at adding an option to the driver to clean them up. And sometime I have to write a cleanup function for the Kobo Utilities plugin to do this a well.
Reply 

#8  JSWolf 09-26-2020, 04:54 AM
Quote davidfor
When you delete a book from calibre, it does so in the same way as the device does (with the exception of cleaning up empty directories). So, it doesn't delete those files.

The files are created when the book is first opened on the device (though it might be different if you use ADE to put the book on the device). The annotations files are maintained when reading an epub. As you add and remove annotations they are changed in both the database and the file. The latter is done by the RMSDK and I doubt there is a way to turn it off. It is handled a little differently if you edit the annotations from outside a book. From memory, it updates the annotations in the database, but only updates the file when the books is opened and a merge is done.

Not removing these files does allow an epub to be deleted and then added again and the annotations not lost. But, I'll look at adding an option to the driver to clean them up. And sometime I have to write a cleanup function for the Kobo Utilities plugin to do this a well.
Would you also please add in to delete the excess XML files? Thanks.
Reply 

#9  DrChiper 09-26-2020, 07:41 AM
Quote davidfor
Not removing these files does allow an epub to be deleted and then added again and the annotations not lost. But, I'll look at adding an option to the driver to clean them up. And sometime I have to write a cleanup function for the Kobo Utilities plugin to do this a well.
Yes, perhaps the following options could be made:This would give you all the freedom to add, update & delete ebooks on your device.

I use the delete/add combo a lot when correcting the formatting of ebooks, so the "update" option would be nice

But there is no pressure for this feature, there are certainly more urgent matters to attend to.
Reply 

#10  davidfor 09-26-2020, 09:43 PM
Quote DrChiper
Yes, perhaps the following options could be made:This would give you all the freedom to add, update & delete ebooks on your device.

I use the delete/add combo a lot when correcting the formatting of ebooks, so the "update" option would be nice

But there is no pressure for this feature, there are certainly more urgent matters to attend to.
Resending a book without deleting it first is fairly safe. It is only a problem if you change the internal structure and the ToC. The ToC is extracted and stored in the database, so if it changes, the book has to be reimported. And I have some code to fix that, but, I have to finish it.

But, sometime, I'll add an option to remove the files in the Digital Editions directory when deleting the book.
Reply 

  Next »  Last »  (1/2)
Today's Posts | Search this Thread | Login | Register