5 ms·
On Windows, paths can be accessed with \\?\ prefix: mkdir \\?\V:\con notepad \\?\V:\con\aux.txt This avoids reserved filenames as well as 260-characte
by Grom_PE 9y ago
On Windows, paths can be accessed with \\?\ prefix:
mkdir \\?\V:\con
notepad \\?\V:\con\aux.txt
This avoids reserved filenames as well as 260-character length restriction. But many programs that try to do any path processing fail after seeing an unexpected prefix, even File Open dialog (on Win7 at least).
- pjmlp 9y agoIt was finally fixed on Windows 10.
- ethomson 9y agoLength was, maybe. Reserved device names (like CON, AUX, etc) are still reserved.
- pjmlp 9y agoI was referring only to length.
- Dylan16807 9y agoNot really. Windows 10 made it easier in certain ways for a program to support long file names. But it still requires explicit support, and programs can and did support it previously. And importantly explorer still doesn't support it properly.
- pjmlp 9y agoIt just requires enabling it, no special care from applications. It is disabled by default due to backwards compatibility. https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx https://msdn.microsoft.com/en-us/library/windows/desktop/aa3... The file explorer does not support it on purpose. https://superuser.com/questions/1114359/windows-10-home-anniversary-update-long-path-fix-not-working https://superuser.com/questions/1114359/windows-10-home-anni...
- Dylan16807 9y agoOnce you enable that, it still only works on applications that explicitly declare support in their manifest. The backwards compatibility here is only in the fine details of how you deal with long paths. The old way and the new way both require application support. The new way is easier, but the old way worked fine even on XP and earlier. This setting isn't actually future-looking. It was already possible to make these files with certain tools. And they could have let it always be on for programs that support it. This setting exists so you can signal to programs that they shouldn't use long paths, even when they are capable of it. > The file explorer does not support it on purpose. Sure, it's on purpose, but it's a good example of how impotent the setting is.
- imglorp 9y agoHell, 8.3 filename creation is still enabled by default on 10. WTF? https://technet.microsoft.com/en-us/library/cc959352.aspx https://technet.microsoft.com/en-us/library/cc959352.aspx
- HankB99 9y agoLast time I tried I was still unable to create the file '.gitignore' on Windows 10 using the file browser. It insisted that I enter a file name and did not consider '.gitignore' an acceptable file name. It is possible to create that file using other tools such as an editor so it's a user interface shortcoming and not a filesystem shortcoming.
- Dylan16807 9y agoThat one has a trick to it! Explorer rejects filenames that are "just extensions", but that's just a strong opinion it has. At the same time, there is a behavior that filenames ending in periods are actually invalid, and get the periods silently stripped by win32. So type ".gitignore." to name a file .gitignore