4 ms·
There are some APIs that have a lower limit than 260. But the limits can be bypassed using `\\?\` prefixed paths (except when using SetCurrentDirectory) or by e
by ChrisSD 3y ago
There are some APIs that have a lower limit than 260. But the limits can be bypassed using `\\?\` prefixed paths (except when using SetCurrentDirectory) or by enabling long paths https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry#enable-long-paths-in-windows-10-version-1607-and-later https://learn.microsoft.com/en-us/windows/win32/fileio/maxim...
- arka2147483647 3y agoWindows.h defines MAX_PATH as 260. Many apps do something like char path[MAX_PATH] In that case, no amount of prefixing will help you, if random app enforces the limit.
- hilbert42 3y ago"no amount of prefixing will help you, if random app enforces the limit" I've noticed that, it's partially the reason for my confusion (I didn't wake up for quite a while as I put it down to the different versions of Windows I was running on various machines). Other pains are caused by apps that still don't run Unicode and crash or stop copying when they encounter a non-ASCII character.
- pjmlp 3y agoYeah, old ones using raw Win32 calls, where developers haven't read anything beyond Petzold's book.
- criddell 3y agoSo is the limit 259 characters plus a null?
- hilbert42 3y agoThanks for the reference, I wasn't aware of those changes in Win 10 (I run mainly Linux and have been weaning myself off Win for some years). "...(this value is commonly 255 characters)." I think the word 'commonly' in those notes confirms my point in that it's changed slightly over the years. Also, I recall the internal processing was once 16k and not 32k, come to think of it this may have been with the previous version of NTFS (can't remember which version of Win that was). My interest is now piqued so I'll search it out. That we're even discussing such matters confirms the thrust of the article.