in reply to Path and File Name Maximum Lengths
Perhaps http://www.foken.de/alexander/projekte/windows/deepcopy.html and especially #Algorithm may help you.
Unfortunately the results from admittedly limited tests I have done do not seem to agree with what I have found on the internet.
Why doesn't that surprise me? MS has failed to define an upper limit for the length of an absolute filename in the past. Many API functions have some arbitary limits, typically 256 or 260 chars, some newer APIs accept even longer names. Usually, there are many different APIs for the same purpose, with different limits and different features, two or three levels of legacy APIs (dating back to Win95, WinNT 4, Win3.x, and even DOS), ANSI and Unicode variants, different APIs for drive letter paths and UNC paths, and so on. This ends in applications like the Windows Explorer not being able to access files with absolute names longer than 260 chars.
Lessons learned from that: If you can't avoid Windows, keep the paths short and without spaces, don't call API functions with more than 255 chars, but be prepared to get much longer paths back.
Alexander
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Path and File Name Maximum Lengths
by ikegami (Patriarch) on Jun 14, 2010 at 21:26 UTC | |
by afoken (Chancellor) on Jun 19, 2010 at 05:27 UTC |