Windows OS

How to Fix Destination path too long error in Windows 10?

Windows has a specified limit for the number of characters that can be utilized for naming the file as it lengthens the destination path of the file explorer and so the “Destination path too long error” can occur. This particular limitation can be encountered due to the disabled “LongPathsEnabled” key etc.

This blog will state the approaches to resolve the long destination path issues in Windows 10.

How to Fix/Resolve “Destination path too long error” in Windows 10?

To fix/resolve the “Destination path too long error“, utilize the following fixes:

    • Rename the Parent Folder.
    • Change the File Extension Temporarily.
    • Enable the “LongPathsEnabled” Key.
    • Move the File(s) Using Command Prompt.

Fix 1: Rename the Parent Folder

While copying either a single or multiple files/folders, try shortening the name of the parent folder, which will assist in shortening the destination path, thereby resolving the discussed issue. To make this approach come into effect, simply rename the parent folder with a comparatively shorter name.

Pro tip: While renaming the parent folder, you can consider using abbreviated forms in case of vital terminologies.

Before


After

Right-click on the parent folder, select “Rename” option, and rename the folder with a comparatively shorter name:


After doing so, observe if the path issue resolves. Otherwise, consider the next solution.

Fix 2: Change the File Extension Temporarily

If the limitation is faced with a single “.zip” or “.rar” file, change the file extension to “.txt” temporarily and revert it to the original after the file is moved to the desired destination.

Step 1: Add “.txt” Extension

First of all, change the extension of the “.zip” folder to “.txt”:


Step 2: Show the File Name Extension

In the “File Explorer”, open the “View” tab and mark the highlighted checkbox. Upon doing so, the renamed zip folder will be evident with the configured extension, i.e., “.txt”:


Lastly, move the file to your desired location and modify its extension back to the default one.

Fix 3: Enable the “LongPathsEnabled” Key

If you are a Windows 10 user and you have upgraded to the “Anniversary Update (1607)”, enable the “LongPathsEnabled” key by changing its value. Enabling this key can resolve the discussed issue permanently.

Step 1: Open “Registry Editor”

Firstly, enter “regedit” in the following Run box to navigate to “Registry Editor”:


Step 2: Switch to “FileSystem” Directory

Now, navigate to the discussed key by following the provided path:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem

 

Step 3; Assign the “Value data”

Lastly, assign the value “1” to the “LongPathsEnabled” key to enable it by triggering “OK”:


The long destination path limitation will likely resolve now.

Fix 4: Move the File(s) Using Command Prompt

If none of the above solutions worked out, try moving the files from the source to the destination via Command Prompt. For doing so, apply the following techniques.

Step 1: Start “Administrative Command Prompt”

First of all, open up the “Administrative Command Prompt”:


Step 2: Move the File

Now, move the desired file(s) from the source directory to the destination by typing the below-provided command:

>xcopy *path of source files* * path to destination* /O /X /E /H /K

 

After applying the command, verify the transfer of the directory/file to the destination and the encountered limitation will sort out via this alternate approach.

Conclusion

To resolve the “Destination path too long error” in Windows 10, rename the parent folder, change the file extension temporarily, enable the “LongPathsEnabled” key, or move the file(s) using Command Prompt. This write-up stated the approaches to cope with the long destination path limitation.

About the author

Umar Hassan

I am a Front-End Web Developer. Being a technical author, I try to learn new things and adapt with them every day. I am passionate to write about evolving software tools and technologies and make it understandable for the end-user.