How to Fix ‘File Path Too Long’ Error While Copying, Deleting or Opening Files, Without Using Third Party Applications

This is an error you might have experienced more at work than at home. You decided to copy a file or take a backup of it to another location or drive, you browse to the source location and starts copying. But you get this error, instead.

Error 1 Error 2

Error 3

Why does it come?

There is a pre-defined character limit beyond which you cannot name a file or folder, and it varies from one OS to another. Mostly it varies between 256 and 260 characters. This is the character limit for a file name, which excludes the file path under which it is located, like “C:\Documents and Settings\Test User\Desktop\test file.txt”. But, when you copy a file from one location, it takes into account the entire file path. So, if the file is residing under a folder which is too deep or too long, that has a length beyond the set-limit, you will get errors like the ones shown above.

How do I know that the file path length is causing the issue?

  • One way you will know is definitely from the error messages similar to the ones above which clearly mentions the problem.
  • Some other times, it won’t. You will simply get a message saying ‘Cannot Copy’ in the title.
  • Or, some other times, the files won’t open properly. They would open and close instantly without giving any errors.
  • Also when you right-click such files, the number of options available in the right-click menu would also be limited compared to other files.

Error 4

All these are caused by those incredibly long file paths.

So, how can I copy the files or fix this issue?

There are a couple of ways you can fix this easily without the use of any 3rd party applications.

  1. Check the folder path, and shorten some of the folder names in between thereby reducing the file path length. You don’t necessarily need to put the folder name as ‘Mission Impossible Three’ when you can still recognize it as ‘MI 3.’
  2. The main thing many people miss when they save a file or folder their Desktop is that the actual path to that folder in desktop is either ‘C:\Documents and Settings\%username%\Desktop’ or ‘C:\Users\%username%\Desktop’ depending on your OS. So as you can see, its already longer than you thought it is. Go to Start — Run and type ‘cmd‘ and press OK, or click start/press windows key and type ‘Command Prompt‘. Once in the command prompt window, type the following command :

subst V: “C:\TheRidiculouslyLongFolderNameWhichYouDontNeedAtAll” ,


subst = substitute command

V = a drive letter of my choice, you can select your own.

C:\TheRidiculouslyLongFolderNameWhichYouDontNeedAtAll = the file path you want to shorten. Change it according to your situation.

Error Fix Command

So, basically this command would convert the entire folder path you provide in the command, into a single temporary drive letter, like V in this case, which gets created in My Computer. Now all you need to do is, go to the My Computer, and open the V drive, and copy the data from there.

After the Fix to File Path Error

Note : To remove the new drive from My Computer, go to Command Prompt again and type subst V: /d

There you have it, try this the next time you get the error, and see how it goes. If you are still confused, let me know in the comments section below.


47 comments on “How to Fix ‘File Path Too Long’ Error While Copying, Deleting or Opening Files, Without Using Third Party Applications

  1. Try and download ” Long Path Tool ” is also useful in situations where you see these error messages: Cannot read from source file or disk, there has been a sharing violation, cannot delete file or folder, the file name you specified is not valid or too long, the source or destination file may be in use and many other file managing errors.

    Liked by 2 people

  2. How I can copy a file path that is too long from a Windows server 2008R2 shadow copy ? (Previous versions) I can’t subst to a shadow copy or use long file tool.


  3. The solution in the post above its clean, creative and very useful. Thanks a lot Vimal Suresh.
    But use “Long Path Tool” its a bad idea. First of all, they are more interested to sell their software instead resolve your problem. It has an ugly and old interface, and personally it dislikes me.


  4. The fact that Long Path Tool is SPAMMED as a solution on every sight is more than enough to deter people from ever using it, besides it sucks…just use the free, manual methods described in depth here and elsewhere.


  5. I just downloaded a specific wndows hotfix for long file paths.. .

    I had 194 different files that wernt copying over. Would have been too long to change the file name for each file.

    Hotfix seemed to work a treat…


  6. I had problems with deleting folders on WIn2008R2 when it said folder were still there.
    I used ztree (google it) and it deleted no problem.
    Also, if path is too long, map into the path
    net use N: \\Server\share\path\path\path\path
    then N: isn’t too long of a path and you can move or delete
    You can also move folders that are too long back to root and then delete/modify


  7. Hello guys, is there a free “Long path tool”? because everytime I used the Long path tool I downloaded it always says that I have to buy the full product. Thanks!


  8. Pingback: Troubleshooting: File Path Limits in Windows | Vermont DBVI Training

  9. Pingback: Path Error - CARA CEPAT LANGSING

  10. Pingback: How To Fix Error Deleting File Or Folder | Information

  11. Thank you so much, this worked like a charm. I didn’t have to copy the shortened file to the original location, either, it self-copied. Much appreciated!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s