destination path too long
Windows 10

How To Fix An Error Destination Path Too Long-Detailed Instruction

Are you having an error of destination path too long while moving and copying the file? Head to our today’s article to find out how to fix this issue!

For people who are using Windows operating systems, a destination path too long is one of the common problems when they attempt to move or copy files. However, this error is not that serious as there are several solutions that you can do to fix it. To get more information about this error, head to our interesting article below! Let’s scroll down to read!      

What Is the Destination Path Too Long Error? 

Many users might think this error is caused by the limitation of the NTFS file system, but it is not. It is mostly related to the Win32 Application Programming Interface (API). The point is, in Win32 API, the Max_Path value is 260 characters. However, most standard applications don’t work correctly with a file name too long that exceeds 256 characters. 

Also, Windows can understand the path completely under the files’ names. Fortunately, many third-party programs have created files, folders that possess a path length over 256 characters, like the FAR, Total Commander.

destination path too long
A message saying your computer is having destination path too long error

The windows 10 destination path too long might lead to other problems as following: 

  • Data recovery error from shadow copies
  • Creating the files and folders that impossible to access 
  • Causing the loss of files during the data transferring process 
  • Creating problem while synchronizing and roaming profile 
  • Causing the incorrect directories size calculation 

How To Fix An Error Destination Path Too Long – Detailed Solution

Here there are types of messages you might see while operating the files and folders: 

  • Destination path too long: This error happens when users try to copy or relocate files to this place
  • Error path too long: This issue occurs when users attempt to move or copy files from the source
  • File name too long to copy: This error occurs when users try to edit the file name 
  • Filename too long to delete: This happens when users try to delete the folders or files. 

Several ways that can help you to fix the destination path too long Windows 10. Let’s have a look at them one by one! 

Make The Name Of The Original Folder Shorter

If you see the message “windows filename too long“, shorten the name of the original folder! This is the simplest way you could do to better the situation. Implement the mentioned operation and observe whether the problem got resolved. 

In case you don’t see anything change, keep going on with the following step. Remember that there is a limitation in the length of the file name. If many files in your folders exceed this limit, you will be unable to do anything with the file, such as deleting, moving, copying. Also, it is the same with folders.

Using The Xcopy command

Sometimes, you name the files or folders and forget that the file names would be too long. So the second method we would like to mention here is using the Xcopy command. It helps you solve the windows filename too long and the source path too long with ease. 

First, press the start button to open the cmd box. Next, right-click before running as administrator option. After that, paste the following order statement into the command box: copy *path to source files* *path to destination* /O /X /E /H /K.

Don’t forget to edit the order statement with the real path on your computer. Finally, click on Enter to finish the process, and the file will get transferred. 

Name The File Extension To Text Again Temporarily

Due to experts, there are limitations while transferring the file .txt because the file names would be too long for the destination folder. 

If you are using a file and it is in the form of a file zip, you should change its name to .txt tail before doing any action on the file to the new place. Don’t forget to revert the file to the .zip name. Generally, follow the below steps: 

  • Right-click on the mouse and choose the “rename” option 
  • Change the name to “.txt” tail 
  • Now attempt to relocate the file to the new folder
  • At the new place, rename the file back to name with the “.zip” tail

Some users have asked us that they could not figure out the extension while renaming the file. Our answer is you probably don’t enable the function properly. Therefore, to activate it, all you have to do is go to Explorer and get in the view category. Here, stick the box with the extension option of the File name. 

Using Robocopy Utility 

If you applied the mentioned methods, but nothing works; still, you can try to use Robocopy. This method solves file name too long windows 10 error easily. Robocopy will allow you to synchronize files and copy them with their long path directly. 

Once, we could not delete the directory due to the limit of path length, so we moved the data from the directory first with the help of Robocopy.

destination path too long
Using the Robocopy to move the data 

To get the process done, we just deleted the files from the source directory by  the order statement: Delete c:\folder1\folder2\folder3\longpath\ /q /f 

Create A Symbolic Link 

Interestingly, creating a link as a part of the path can somehow shorten the length of the file name. Detail as following: 

mklink /D “C:\Link To Folder” “C:\Users\Name\Original Folder”. 

You are suggested to add the “C”\Link To folder” to better the operation.  

Operating Files Or Directories Using PowerShell 

Let’s talk a bit about the PowerShell application! This is a tool that is used to solve a lot of Windows issues. Below we are going to walk you through steps on how to fix the issue if the file name(s) would be too long for the destination folder. First, launch the PowerShell application by using a search tool in the menu of Windows. 

destination path too long
Using cmdlet instead of path in PowerShell 

Using Copy-Item To Copy Directory

Then, you should copy the “TestSource” directory, then paste it to “TestDestination”. Detail as below: 

Copy-Item TestSource -Destination TestDestination –Recurse

Here, the destination is the place where you want to locate the copy, and Recurse is copying all the units within the place.  

Be noted that the copy order won’t relocate the files within the folder source.

Using Move-Item To Move The Directory 

To move the file permanently, apply the Move-Item cmdlet to move the files/folders from their source to the wanted destination using:  

Move-Item -Path TestSource -Destination TestDestination

Here, Path is to define the item that you want to relocate. And the destination is the place you want the copy to situate. 

Using Remove-Item To Delete The Directory

In case you want to delete the files or folders, apply the Remove-Item cmdlet: 

Remove-Item TestSource -Recurse -Force

Here, Recurse means deleting everything within. Meanwhile, Force is making operations implemented without asking for permission. 

Hidden Share Path 

A hidden sharing path is used when users need to relocate many files from one place to another. There will be a few steps that you can follow: 

  • Copy the whole path 
  • Log in the short icon “My computer” on the desktop and choose “Map Network Drive” Option 
  • Choose the preferred drive later 
  • Past the long path of the file into the “folder” box

With this tool, you also can do the copy operation finely without getting the error message. 

destination path too long

Mapping the path is necessary. 

Enable Long Path Support (Windows 10 build 1607 or higher)

It means a possibility for users to disable the maximum name limitation. And you can change it on the Registry Editor. 

First, update your Windows 10 with 1607, or use a higher version! Log in to the Registry Editor by pressing on a combination of Windows and R keyboards. 

Next, type the statement “Regedit”! Then, follow the path: Computer >> HKEY_LOCAL_MACHINE >> SYSTEM >> CurrentControlSet >> Control >> FileSystem. 

Then double-click on the “LongPathsEnabled” before editing the value of data to “1”. Save the change and shut down the Registry editor! Finally, click on the Okay button! 

Now, you can either move, copy, or delete the files with long names.

Make Windows 10 Pro Or Enterprise Accept Long File Path 

High Windows versions are often updated with new features, including copying or removing long file paths. However, to enable the function, you should:

  • Log in to the Group Policy Editor from the Start menu 
  • Follow the route: Computer Configuration > Administrative Templates > System > Filesystem
  • Do the double-click on Enable Win32 long paths and choose the Enabled option. Update the program if needed.
  • Now, check whether you can do any operation on the files like copying, deleting, or moving the file path.

The Bottom Line! 

Thus, if you are having a problem with editing the file like removing/deleting/copying, check whether your computer is having the destination path too long error! Via this article, we also hope you have known more about this issue and how to solve it completely. In case you still have other questions about this problem, don’t hesitate to head to us with a message. Good luck! 

Maybe you are interested in

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top