Sunday, November 19, 2017

Use Long Path or Filename in Windows 10

Microsoft Windows used to have a limit on the length of path or filename. The MSDN article "Naming Files, Paths, and Namespaces" is an in-depth discussion about this topic. Since the roll-out of .Net 4.6.2, long path names exceeding the MAX_PATH, or 255 characters are now permitted as discussed in this MSDN blog post "More on new .NET path handling".


To enable this feature, you can simply set the following Windows Registry DWORD to 1.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled For Windows 10 Professional Edition and Enterprise Edition, you can also configure it with the Group Policy editor (gpedit.msc). The setting is under the Administrate Templates, System, File System, and Enable Win32 Long Paths.