Extremely long file names and directory paths.

File Name too long?  Or perhaps along with the directory path it’s too long?

 When copying files for backup from long directory paths you have probably come across an error, every so often, that says something like “directory path too long would you like to skip this file?”.  The reason for this is that you are usually only allowed a maximum of 244 characters in the file name so copying a path which has over 244 characters in the name fails.  This does not happen often but sometimes with networks and programs that tend to nest subdirectories names can become too long for this rule.   With the introduction of Windows 10 (starting at revision 1607) Microsoft removed this limitation. However, this is not enabled by default to maintain compatibility.  You must opt-in for this feature to work.   There are two ways to do this, from the Registry or from the Group Policy editor (Not included in Windows Home).

For those of you that have Windows 10 Pro or above you can open the Group Policy Editor and navigate to Computer Configuration > Administrative Templates > System > Filesystem > Enable NTFS long paths and set it to Enabled.

For any version of Windows 10 (including Home) you can make a Registry change.  Always remember that registry changes can damage your computer to the point of completely ruining it.  Do not make these changes unless you are comfortable with it.

You will need to navigate to:  HKLM\SYSTEM\CurrentControlSet\Control\FileSystem and look for the DWORD: LongPathsEnabled if it is not there, create it as a REG_DWORD 32 Bit. The default value is 0 which is compatibility.  If you change its value to 1 then you will have enabled unlimited File/Path lengths.

I am adding a link to a zip file which has two Registry file modifiers which will do this automatically for you.  Just unzip the files and run the ExtendedFileNames_on to switch it to on and ExtendedFileNames_off to turn it back off.

Extended path / file length registry entry


Leave a Reply