Long file names under Windows 10

It's not just when using npm on Windows that you come across a limit that's almost 30 years old and limits paths to folders and files to a maximum of 255 characters. It's not NTFS that's to blame here, it's LFN . This leads to annoying bugs and incompatibility between operating systems. This is an unfortunate situation in times of WSL , but luckily you have been able to fix it yourself in the registry for some time now.


Even on a current Windows 10 Pro 1709, you get this message when creating a folder / file path that is too long:

Long file names under Windows 10

After the Anniversary Update of Windows 10 you can finally lift this limit. You should be aware that older software may no longer be able to access files that are outside of this limit. Not all 32-bit software is affected here and you can rely on a test. You navigate to the key with regedit

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem

and creates (if it does not already exist) the DWORD (32-bit) value LongPathsEnabled and sets its value to 1.

After a restart the change is active. Unfortunately, the Windows Explorer does not support longer paths at the moment (hopefully this will change in the future), but you can use more powerful tools like One Commander, which now supports paths with a character length of 32767 characters.

Back