Quote:
Originally Posted by kovidgoyal
The path length is limited to 75 characters. If it were made longer then the path to individual book files would become too long for windows.
|
Windows supports paths of up to 32,767 characters if you prefix the path with "\\?\". For example, "\\?\D:\very long path". See the following web pages for reference:
- http://www.codinghorror.com/blog/200...-too-long.html
- http://msdn.microsoft.com/en-us/library/Aa365247
I successfully used this method last year when I was writing scripts to clean up files on a file server at work.
It works fine in Python. I think calibre can fix this limitation:
Code:
import os
p = "\\\\?\\" + os.getcwdu()
for i in range(10):
p = os.path.join(p, 'x' * 100)
os.mkdir(p)
os.stat(p)
print len(p)