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.
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.
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.
- 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.’
- 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” ,
where
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.
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.
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.
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.
LikeLiked by 2 people
That’s nice! I would definitely give it a try. Thank you! 🙂
LikeLike
One of the best , automatic program is DuplicateFilesDeleter, try it demo version and watch your PC running smoothly.
LikeLike
Works perfectly. Thanks.
LikeLike
Everybody says to download ‘long path tool’ which i did, i told it to move my files and got a prompt to purchase the product. – for the last hour and a half i have been searching for a pre-cracked version and have had my virus protection going ape-shit and forcing pages closed. – so stop saying ‘just download long path tool’ its like saying ‘what’s that.. you’re poor? well just go and get a million dollars’
LikeLike
You are right … Please Try “Long Path Tool” program Its really working, i have also tried it So nice of it
LikeLike
Well, you can use Long Path Tool, it works good!
LikeLike
Long Path Tool is the most appropriate program to sort out such issues
LikeLike
Be careful, or it will lock up your computer, till you purchase the $19.00 program to unlock.
LikeLike
Use this freeware tool, it works without having to do so many steps
http://backupchain.com/DeleteLongPath.html
LikeLike
That worked awesome. Thanks so much!!!!!
LikeLike
it is awesome (lewis) thank you
LikeLike
Long Path Tool is the most appropriate program to sort out such issues
LikeLike
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.
LikeLike
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.
LikeLike
its to long procedure…
y not using one software which can handle our errors and do job .
Inshort use DuplicateFilesDeleter software
LikeLiked by 1 person
Hello
you are welcome to vimalsuresh
you can also use long path tool to sort out you problem
…………….
LikeLike
Use 3rd party copying tools like tera copy, maybe that should help. it worked for me.
LikeLike
another Solution File path too long, please try google for “Long Path Tool” program. its working for me. 🙂
LikeLike
If Long Path Tool fails on start up, please ensure you have .net framework installed on your PC.
LikeLike
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.
LikeLike
it works..great article..thanks dude..u make my work so easier 😀
LikeLike
Howsoever long the path may be, you can always rely on Long Path Tool. Its sure to sort out your problem.
LikeLike
This is Genius!!!, perfect thanks.
LikeLike
Thank you for this post. Well, I’ll also suggest long path tool for fixing these errors. Its a great tool 🙂
LikeLike
“Long Path Tool” is really a great tools for fixing this type of Issues.
LikeLike
this was a lot easier than downloading some sketchy software that costs money.
LikeLike
it works! thanks…..
LikeLike
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…
LikeLike
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
LikeLike
try Long Path Tool
LikeLike
Hello friends i alsoo face same problem.someone suggest long path tool ,its really helpful.
LikeLike
Use this tool “Long Path Tool”
Awesome tool to fix this error
Thanks
LikeLike
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!
LikeLike
You should check out ‘Long Path Tool’ it will help you fix the issues.
LikeLike
Try Long Path Tool Program.
LikeLike
ok
LikeLike
The best freeware tool to do this is called “FASTCOPY” v3.05 written by Japanese SHIROUZU Hiroaki.
Trust me people this tool is brilliant !! – A must for all Administrators Toolbox.
http://ipmsg.org/tools/fastcopy.html.en
LikeLike
Or you could download the hotfix from Microsoft – https://support.microsoft.com/en-us/kb/2891362
LikeLike
Pingback: Troubleshooting: File Path Limits in Windows | Vermont DBVI Training
https://onedrive.uservoice.com/forums/262982-onedrive/suggestions/6325774-enable-long-file-paths-aka-file-name-too-long-p
LikeLike
Pingback: Path Error - CARA CEPAT LANGSING
it works! thanks
LikeLike
it works… solving my long time problem. thanks a lot
LikeLike
Pingback: How To Fix Error Deleting File Or Folder | Information
Didn’t work for me unfortunately. Still getting the error message and unable to delete the files in this folder!
LikeLike
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!
LikeLike
Thank you so much!
It works perfect.
LikeLike
Thank you so much! You solved my problem
LikeLike
You can use command prompt to copy this file.
xcopy /s /h /k *.txt c:\temp
LikeLike
There is a limit of path name in windows which is 250 characters. More than that is not allowed, so make sure your file name is not too big. If you want to overcome this error you can try GS Richcopy 360. I used it also to solve this problem. This software provides support for long path name and many other interesting features too. Give it a try, cheers!
LikeLike
that is a neat trick..thanks
LikeLike
This is not a limitation of Windows, but of the File Explorer program. Many (most?) other file manager programs do not have this problem. Some were already mentioned, others are Total Commander, etc…
LikeLike