![]() |
#1 |
Junior Member
![]() Posts: 1
Karma: 10
Join Date: May 2019
Device: S9+
|
Calibre truncates long names on Win10 with long paths enabled.
Hi,
I am new to Calibre and would appreciate someone to advise (or point into the right direction) why Calibre truncates long file names in Windows 10 with long paths enabled. Before the long paths support was enabled Calibre would truncate all the metadata and the file names, but after the change it only truncates the file names. The metadata is intact. Thanks |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,130
Karma: 27110892
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I dont know what you mean. metadata is written inside files, filenames have no bearing on it.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Jun 2022
Device: Android
|
@kovidgoyal
First of all, thank you for creating the app. It's very useful. However, I use moonreader to read ebooks so that my bookmarks can be synced across devices. I have several books with similar names except for a number at the end of the name. So the filenames for these books are all the same. moonreader syncs bookmarks based on filenames. So a few days after I started reading my second book, I realized that all my bookmarks from my first book were overwritten I could use abbreviations for these books with similar long names, but it's a little inconvenient. Please consider addressing this issue. thanks |
![]() |
![]() |
![]() |
#4 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
https://www.itprotoday.com/windows-1...ort-windows-10
Quote:
Code:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled = 1 So metadata like "Making Numbers Count: The Art and Science of Communicating Numbers" by Chip Heath & Karla Starr" gets stored on disc by Calibre as "Making Numbers Count_ The Art a - Chip Heath.epub" I believe that's a limitation to work with other OSs I use calibredb with the export option to copy files to a flat folder and name them based on metadata: "Chip Heath & Karla Starr-Making Numbers Count_ The Art and Science of Communicating Numbers.epub" and side load from the flat folder |
|
![]() |
![]() |
![]() |
#5 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,304
Karma: 165617033
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
This does not affect the title or authors information stored in the metadata which is stored internal to the file and not as part of the filename. |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,559
Karma: 74000001
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
It is. If you copy a library folder from one OS to another, you won't run into any filepath issues from the length or illegal characters or the like.
In any case, you aren't meant to be mucking around in the library folder. Quote:
|
|
![]() |
![]() |
![]() |
#7 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,160
Karma: 8800000
Join Date: Jun 2010
Device: Kobo Clara HD,Hisence Sero 7 Pro RIP, Nook STR, jetbook lite
|
This sounds more like a moonreader problem than calibre.
bernie Quote:
|
|
![]() |
![]() |
![]() |
#8 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,589
Karma: 29709834
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
BR |
|
![]() |
![]() |
![]() |
#9 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
Quote:
1. delete d:\ebooks\kfx folder 2. export using calibredb all kfx files to that folder as single level renaming using a template to add series if required so I can sideload to my KIndle 3. delete d:\ebooks\azw8 folder 4. copy d:\ebooks\kfx to d:\ebooks\azw8 5. rename the kfx files to azw8 so Kindle Previewer can open them since the KP cannot open kfx files 6. delete d:\ebooks\epub folder 7. export using calibredb all epub files to that folder Last edited by phossler; 06-19-2022 at 09:15 PM. |
|
![]() |
![]() |
![]() |
#10 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
I was just saying that while the metadata in the book and in the calibre database might have a full and very long title, the file name on disc is truncated to allow it to work across multiple operating systems
|
![]() |
![]() |
![]() |
#11 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,130
Karma: 27110892
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
It's a limitation purely for windows. On other OSes calibre does not enforce this restriction. And this restriction is still present on windows despite the registry key because the registry key is a god awful hack. With it enabled random windows software will be unable to see the files, including windows explorer. And you can destroy your library copying it from one computer to another if the state of the registry key is different on the two computers. I prefer to be conservative with data integrity. If someday Microsoft manages to lift this restriction for real, I might reconsider. That day hasnt arrived yet.
|
![]() |
![]() |
![]() |
#12 |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,608
Karma: 103503445
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
Even without the Registry thing Windows backups and file copies can fail because the total path and filename is over 255 characters. Metadata has the title. The Calibre file names just need to be unique as as short as possible.
|
![]() |
![]() |
![]() |
#13 |
Enthusiast
![]() Posts: 25
Karma: 10
Join Date: Jan 2024
Device: Sage / rm2
|
I hope this isn't a necro, but I was finally learning templates after 10 years of Calibre for specific this reason.
It's not only Windows that does this. I am using Calibre 7 on Arch linux. This happens to me. I use koreader on my kobo sage with top-level directories to sort my titles by #subject. Ideally, a simplified version would be like /books/History/Some_Author-Some_Series-01-Some_title.epub however, if that is very long (I use series so it can be), the path or file name is truncated. This isn't such a big deal when it happens to the filename because koreader shows the metadata title in the filemanager once I'm in that directory, but it may come out one of these random ways: /books/Hstory /boks/History /books/History It is totally random where they end up, which is kinda sketchy. Even stranger, two books with the same path/name length get truncated in different ways, dividing the bunch. I'd much rather a message telling me the transfer had failed than have the system make arbitrary decisions about where my files land. It's not noticeable when using Nickel because all browsing is via the database. But sending 50 books on one subject to the e-reader might end up with the same subject scattered in different places. With koreader, this is no good. I started using some send-to-device templates that mostly work. Since I really only need the top two levels to be 100% correct, I preemptively truncate the title myself like this: books/{#shelf:||/}{author_sort:sublist(0,1,\,)}-{series:||-}{series_index:re(^(\d)(\.|$),0\1\2)||-}{title:'sublist(sublist($, 0, 1, ':'), 0, 10, '_')'} This ensures no title shows at all beyond the subtitle separator ':' and the rare book that has a very long main title doesn't have more than 10 words, separated by '_' It didn't seem to matter if I placed the Subject/Auth/Series/Title on the same line on the filename or as nested directories. It was always shortened. I think this is more of a vfat bug than an os bug. I'm thinking of trying a regular rsync and see if the same happens. So far, I've only used Calibre for this experiment. ext4 might be a better fs option for those who have that choice, for a few reasons. |
![]() |
![]() |
![]() |
#14 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,130
Karma: 27110892
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
When sending to devices calibre always truncates to 256 as various devices have various limitations.
|
![]() |
![]() |
![]() |
#15 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,308
Karma: 7955525
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Use the template function shorten() to explicitly control how much space is used by each name segment and how the segments are shortened. |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem with Calibre's folder structure and long names in Windows | crixtiano | Calibre | 1 | 07-28-2017 02:05 PM |
Calibre taking a long, long time to update metadata on sony prs650 | hydin | Calibre | 5 | 06-05-2012 12:21 AM |
Is there anything in Calibre that can fix long file names automatically? | dmunson | Calibre | 4 | 02-05-2012 06:12 PM |
File Names to long? | JTAL604622 | Calibre | 5 | 08-31-2011 03:21 AM |
Files with long names? | cmhsieh54 | iRex | 0 | 08-05-2009 12:43 PM |