View Single Post
Old 03-08-2015, 12:50 PM   #8
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,453
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
As you are sending files to CC and wanting to use a rather complex folder structure for use with file managers, you should know about the path length restrictions. The wireless driver in calibre enforces a maximum file length of approximately 200 characters for a book file on your device. The limit comes from an attempt to ensure that a Windows machine can use MTP to see the files. If your template generates a name longer than allowed then each component of the name (the parts between / characters) will be truncated by removing characters out of the middle of the component until the path fits. If you have books with multiple authors and long titles, it is virtually guaranteed that the path on the device will not be what you expect.

You can ensure that the path names follow your rules within the limit by using a template that ensures that the components fit within acceptable lengths while being truncated using your rules. See the "shorten" template function.

BTW: eschwartz;s example has an extra parenthesis at the end. It should be
Code:
{series:'test($, strcat("SR - ", field("series")), field("authors"))'}
chaley is offline   Reply With Quote