Is LaTeX (pdflatex) able to read files with extra long file names on Windows? (up to 32767 unicode characters)
https://ss64.com/nt/syntax-filenames.html
The NTFS file system supports large paths and file names up to 32,767 unicode characters, normally this is restricted by the 260 character* MAX_PATH limit enforced by the Windows Win32 API. This means it is sometimes possible, when moving files and directories around, or mapping drives, to create a pathname which is too long for Win32 to process.
There is an alternative for accessing very long filenames: for file I/O, the "\?\" prefix to a path string tells the Windows APIs to disable all string parsing and to send the string that follows it straight to the file system.
...
Because it turns off automatic expansion of the path string, the "\?\" prefix also allows the use of ".." and "." in the path names, which can be useful if you are attempting to perform operations on a file with these otherwise reserved relative path specifiers as part of the fully qualified path. This syntax can be used in both CMD and PowerShell.
"\\?\UNC\Server64\Teams\Personnel\some - very - long - file - name.txt"
\input{ \\?\extremly_long_file_name } % Will this work?
\
, here, plus really you should never have paths in TeX file names: they should be put somewhere 'TeX can find them' and then given by name only. – Joseph Wright♦ Aug 27 '19 at 6:34\input
behaviour on windows machines. – Awaaaaarghhh Sep 24 '19 at 6:03MAX_PATH
, so the paths still won't be accepted. On modern Windows versions (some Windows 10 introduced this, IIRC) it's possible to enable long path names by default (without any prefix), but this still won't affect old code hardcoding buffer sizes toMAX_PATH
. Some reading material. – 0xC0000022L Jun 2 '20 at 14:27