3 ms·
"All I can say is, this article is the tip of the ice berg on Windows I/O weirdness." Well, then, is there a more detailed summary than this one that's accessi
by hilbert42 4y ago
"All I can say is, this article is the tip of the ice berg on Windows I/O weirdness."
Well, then, is there a more detailed summary than this one that's accessible?
This one looks very useful and I'll use it, but to make the point about more info it'd be nice to know how they differ across Windows versions.
For example, I've never been sure about path length of 260 and file length of 255. I seem to recall these were a little different in earlier versions, f/l being 254 for instance. Can anyone clear that up for me?
Incidentally, I hit the 255/260 limit regularly, it's damn nuisance when copying stops because the path is say 296 or 320, or more.
- ChrisSD 4y agoThere 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 4y 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 4y 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 4y agoYeah, old ones using raw Win32 calls, where developers haven't read anything beyond Petzold's book.
- criddell 4y agoSo is the limit 259 characters plus a null?
- hilbert42 4y 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.
- bloaf 4y agoExplorer can resolve some http urls to network paths, e.g. for SharePoint libraries. Programs, e.g. python scripts, can then use those paths, but only after explorer has resolved them. Before that, the path will be treated as not existing.
- deleted 4y ago[deleted]