![]() |
#1 |
Zealot
![]() Posts: 147
Karma: 10
Join Date: Sep 2016
Device: Kobo Sage, Kobo Aura One, Nook Simple Touch, Nook Glowlight,
|
filename restrictions?
What are the restrictions on filenames for sideloaded files? I sideloaded a book which the kobo just refused to see. I tried doing things to it with Calibre thinking maybe there was something wrong with the file. I changed the filename twice and on the second attempt the Kobo decided to admit it was there.
The original file had characters like (, ) and ' in it but I have other books with those. The length of the filename wasn't extraordinary. What should I keep an eye out for in future? |
![]() |
![]() |
![]() |
#2 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 495
Karma: 356531
Join Date: Jul 2016
Location: 'burta, Canada
Device: Kobo Glo HD
|
You have to be careful with filenames with ' in them. There are actually two different kinds, but depending on the viewer, they may look the same. One is a straight tick, while the other one is curved. One works fine while the other does not. I can't remember which is which, so I play it safe by stripping both of them from the filename before copying the file over.
Another character is '!'. It can scan and add the book to the database fine, but it'll throw an error if you try to open it (at least, it does with kepubs; not sure about regular epubs). It seems dumb that it can import the file fine but can't open it, but I can't figure out if it's a bug or a known issue. In either event, if you use Calibre to send books to your device, it automatically strips out those problematic characters during the transfer. I wish it did the same when saving to disk; it would save me a lot of headaches. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Zealot
![]() Posts: 147
Karma: 10
Join Date: Sep 2016
Device: Kobo Sage, Kobo Aura One, Nook Simple Touch, Nook Glowlight,
|
Thanks. It was one in a series and all the others were fine. Some of the others had ' too but maybe they weren't all the same flavour. I'll get rid of those in future. I recall having a problem with ... maybe "#" on a Nook years ago. And I imagine ":" or "/" could be asking for trouble.
|
![]() |
![]() |
![]() |
#4 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Yes, there are restrictions in the file name on the device. As @rtiangha said, calibre should sanitize the name and path. Did you remove the file that wasn't being imported before sending it from calibre? If so, when the import failed for it, that stopped the import from processing later books.
For the record, the KoboTouch driver uses the regex "[\/\\\?%\*:;\|\"\'><\$!]" to match invalid characters in the path. Any matches are changed to an underscore. Calibre will do some other things, mainly about the path length, but I don't remember it makes other changes to characters like this. |
![]() |
![]() |
![]() |
#5 |
Zealot
![]() Posts: 147
Karma: 10
Join Date: Sep 2016
Device: Kobo Sage, Kobo Aura One, Nook Simple Touch, Nook Glowlight,
|
I sideload books by just copying the files. And I change the names in a file list window or with "mv". I used Calibre to see if the book itself seemed to have problems. (After my experience with Black Cat Weekly a few months ago.)
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 495
Karma: 356531
Join Date: Jul 2016
Location: 'burta, Canada
Device: Kobo Glo HD
|
Hmm, well, if you're just using Caibre's Save to Disk function and then manually copy the book over rather than using the Kobo driver to transfer the file, it looks like Calibre already scrubs all the characters in @davidfor's regexp from the filename except for these: %;$!'
The characters I've encountered the most issues with are books with ! and ' in the titles, so under the Save Template in the Saving Books to Disk options, I had this: Code:
{author_sort:re('|!,)}/{title:re('|!,)} - {authors:re('|!,)} Code:
{author_sort:re('|!,)}/{title:re([\'!%;\$],)} - {authors:re([\'!%;\$],)} Anyway, you can copy/paste that (to capture the correct ' character) and you should be good to go as long as you Save to Disk first before copying files over to the device. Last edited by rtiangha; 04-17-2022 at 04:27 PM. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Geo-restrictions | MattW | General Discussions | 5 | 03-03-2016 10:20 PM |
Restrictions on sideloading? | kennyc | Kindle Fire | 25 | 11-22-2015 05:01 PM |
DRM Restrictions | Gene45 | Calibre | 1 | 09-26-2012 05:00 PM |
More App Restrictions | kennyc | Apple Devices | 12 | 06-02-2010 02:29 PM |
Regional restrictions now in the UK | tech_au | News | 166 | 10-26-2009 02:52 PM |