5 ms·
I recalled some of those issues are related to Explorer.exe. For example, there is a restriction on the path characters, I believe it is 256 characters limit. T
by Isthatablackgsd 5y ago
I recalled some of those issues are related to Explorer.exe. For example, there is a restriction on the path characters, I believe it is 256 characters limit. This includes the directory path that the file is located in. This is the issue with Explorer.exe (I think it was due to Explorer is 32-bit), Windows and the file system does not have this limitation because it can manage them just fine. I remember years ago that I have several windows app that can open the file with absurdly long path name without issue (like IrfanView). If I tried to open the file directly from Explorer, it will refuse to load or it will spew out an error. The restriction was imposed because of Explorer limitation. Now, Explorer can handle the with the long path but it has to be enabled in the registry.
- sumtechguy 5y ago260 is the typical limit. NTFS allows for 65535 per filename and I think up to 65535 deep on directories (I could be wrong on the second one). Win32 on the other had usually caps everything at 260 total (MAX_FILE_LIMIT). Most of the docs and examples out there use that. I would bet that it is some sort of FAT limitation. This can be annoying if you move a drive between differing OS's and the NTFS bit on the other side does interesting things. NTFS is also case sensitive. But the win32 layer 'hides' it mostly, there is a flag to turn it on. Unless you do something like write from a linux box and you can end up with 2 files named the 'same' but different case. It is also possible to trick windows into doing it but it is tougher.
- colejohnson66 5y ago> Win32 on the other had usually caps everything at 260 total (MAX_FILE_LIMIT). Nitpick: It’s MAX_PATH :) Also, there is a way around the limitation: prefix all (absolute) file paths with \\?\ https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd https://docs.microsoft.com/en-us/windows/win32/fileio/maximu...
- sumtechguy 5y agoDoh! I should have got that. I should not have messed that one up.
- Meph504 5y agoIt's not limited to explorer, for instance attempting to open excel document, whose path is too long can cause odd errors, often claiming permissions errors. You also have issues where something can be opened with a long path but then the saving fails because it can't write to the location. In general it's a mess.