View Single Post
Old 06-17-2016, 02:50 AM   #5
kacir
Wizard
kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.
 
kacir's Avatar
 
Posts: 3,463
Karma: 10684861
Join Date: May 2006
Device: PocketBook 360, before it was Sony Reader, cassiopeia A-20
Quote:
Originally Posted by excaliber View Post
I thought calibre would automagically detect and also delete all non existent ebooks and the relevant directories but it didn't. Then I saw in the "Formats" column that the entries with non existent ebooks were empty so I could easily delete them.
A book record can exist even if it has no file format associated with it (at the moment).
You might want to delete a book file and later add a better one, for example. Or create a few records in advance and then populate them with actual files.
The fact that you want to delete a *.txt or other format doesn't automatically mean that you also want to have metadata erased.

If you want to learn more about querying Calibre database just open tag browser on the left and select authors, series, formats ... and observe the result in the search bar.
Also read the documentation
formats:"=DOC" means that Calibre will list all files with *.DOC extension but not *.DOCX
formats:"doc" (without the equal sign) will look for all extensions with 'doc' substring, including 'docx', for example.
There is also possibility to use [python] regular expressions, with syntax
authors:"~RegularExpression", so you can look for records with two commas in author field or other very powerful things.
You can, of course, combine search statements with AND, OR, NOT and ().
There is, I think also query for a number of formats but I can't find it at this moment.

You see, this is much more powerful than a search for files from within file manager.
kacir is offline   Reply With Quote