Fix: The file name(s) would be too long for the destination folder error message

Recently while browsing through some of my backup files and folders on my Windows PC, I came across some old backup files that I wanted to delete. I did not have any use for an old backup, so wanted to delete the compressed .tar file.

But when I went on to delete it, I received the following error message:

The file name(s) would be too long for the destination folder

The file name(s) would be too long for the destination folder

Apparently, the compressed file contained a JPG image file, which my Windows was unable to delete. Using the Skip option, I deleted all but this file. Now, why did this happen?

Under standard  Windows file naming system, the total name cannot, or path exceeds 259 characters. This includes the folder path, file name, and file extension. If it does, then when you try to delete it, you will receive this error.

Maximum Path Length Limitation: In the Windows API (with some exceptions discussed in the following paragraphs), the maximum length for a path is MAX_PATH, which is defined as 260 characters. A local path is structured in the following order: drive letter, colon, backslash, name components separated by backslashes, and a terminating null character. For example, the maximum path on drive D is “D:\some 256-character path string” where “” represents the invisible terminating null character for the current system codepage. (The characters < > are used here for visual clarity and cannot be part of a valid path string) says MSDN.

Filename too long for destination folder

Now in my case, the full folder path was:

D:\ Site Backups\ Misc\ backup-4.7.2012_23-41-31_thegadget.tar\ backup-4.7.2012_23-41-31_thegadget\ backup-4.7.2012_23-41-31_thegadget\ homedirect\ 2\ public_html2\ wp-content2\ uploads\ 2011\ 08

And the file name was really long to – like Music-producer-…-and-video-games.jpg – as can be seen in the image.

I opened its location and tried to delete or rename the file. I was not even offered the option to do so. If you can rename it, fine – but I wasn’t offered this option.

File name too long 2So I went ‘Back’ to its subfolder and tried to delete it. No success. I received the same error message.

File name too long 3I then used the Move To folder option to move the folder to my D Drive. This worked! The path had suddenly become shorter, and I was able to delete.

This simple trick worked in my case, and I hope it helps you too.

Sometimes simply rebooting, running Check Disk or using third-party delete freeware are also known to help delete undeletable files and folders.

You can also use the freeware Long Path Fixer to fix Path Too Long errors in Windows.

If nothing helps, then you may want to have a look at this Microsoft thread where some advanced ways have been suggested using CMD and Robocopy.

Related read: The source file name(s) are larger than is supported by the file system.

Download this VPN to secure all your Windows devices and browse anonymously
Posted by on , in Category Windows with Tags
Anand Khanse is the Admin of TheWindowsClub.com, a 10-year Microsoft MVP Awardee in Windows (2006-16) & a Windows Insider MVP. Please read the entire post & the comments first, create a System Restore Point before making any changes to your system & be careful about any 3rd-party offers while installing freeware.

78 Comments

  1. der spud

    I use ztree (Kin to the old xtreegold) to change the name, eg. xyz.gar then delete. Ok, I’m a dinosaur but never found a simpler tool.

  2. leslysab

    Try Long Path Tool software for an easy fix.

  3. Zod

    don’t forget our old pal xcopy. Microsoft also makes a utility called SyncToy that may work.

  4. Thích ? R?p

    thank you, i try and success

  5. Rahul

    really the best concept I learnt from here after trying 10+ different websites

  6. Giann Ramasatya

    Just rename the folder and rename the file

  7. alexon

    Well, you can use Long Path Tool, it works good!

  8. n

    a not much smart alternative might be just zip/rar the folder and copy and open it at the destination folder after paste.

  9. Thorson

    Thank you! Simple solution with no download required!

  10. Thorson

    I downloaded that program and it wanted me to pay to use their features. Not what I would consider “easy”.

  11. Michelle

    Move to folder was NOT an option. But, I was able to move up to a higher folder, rename to a single letter, which then allowed me the option to rename my file to a shorter filename. Then I was able to 1) Move the file to the location I wanted to move it, and 2) name the higher folder back to the original name.

  12. Tyrion

    it really helped and its easiest way to do that… thanx

  13. F Granados

    hello
    the easy way to fix this problem is long path tool,i tried it is easy to use.

  14. R.SELVAKUMAR

    copy or CHANGE WINRAR FILE DATA SAFE

  15. R.SELVAKUMAR

    CHANGE WINRAR FILE DATA SAFE

  16. Dush

    if you cant rename the long file name do rename some of the long parent directories and it works!

  17. Kay

    i used linux for a while an d it created file names too big for windows to delete+these files cannot be opened or renamed….i tried moving files to D drive to make shorter file name but they wont move!!!

  18. MZ

    Thank you so much for this simple solution.. searched so much and finally your comment helped.

  19. TekCroach

    Yes, this is handy, and I have been doing it when I burn dvd’s with very long file names.

  20. TekCroach

    Always working solution. 🙂

  21. integrators

    Simple fix … nothing to download, no tools. Just use SUBST.EXE command.
    Substitute a drive letter for the source path and another for the destination path (may not be necessary depending on local copy/folder/network location) … copy/move files between these two virtual drives with no problem as path is now much shorter …
    i.e. subst m: c:usersownermusicitunesitunes mediamusicvarious artists1980best of the 80s
    subst n: \networkstoragearchivemusicoldiesthe 80s

  22. Patrick8

    Hi Der spud.
    i have a prblem like u. 🙂
    I suggest to try “Long Path Tool” program on google. maybe it can help u.

  23. julias4

    long path tool are also help you for this situation. Thanks

  24. Patrick8

    i suggest u to try using “Long Path Tool” program, i think its solving your problem

  25. Alex

    I used winrar “add to archive” and selected “delete files after archive” and then i deleted archives and done!

  26. BRIANKAY DIMAGO

    Long Path Tool Program is an easy way to solve this problem.

  27. Black Heroes

    thank you.. that helpfull and very simple way

  28. patrik

    Hello, You should try the Long Path Program. It will help.

  29. patrik

    Hello friends i alsoo face same problem.someone suggest long path tool ,its really helpful.

  30. Linda Mayfield

    You ought to try the “Long Path Tool” program. Maybe it can be of help to your problem.

  31. patrick

    hello friends,i suggest you long path tool, its awesome

  32. patrick

    hello friends,i suggest you long path tool,its awesome

  33. TrickHere.com

    Anyone used “Long Path Tool” for this error?

  34. TrickHere.com

    anyone use “Long Path Tool” ??
    this tool can fix this error !

  35. Petrowich

    Cannot Delete Files ? Cannot Copy Files ? Long Path Tool Can
    you must try “Long Path Tool” program … ((Recommended))

  36. gregory

    It’s awesome, the software LONG PATH TOOL works great for me.

  37. kevin15

    Try Long Path Tool program. This will help you in kind of problem. This is very useful.

  38. gregory

    I would suggest Long Path Tool software for these kind of errors, it has solved my all copy paste errors.

  39. kamila danielo

    I
    suggest everyone to try ” Long Path Tool program “. It’s really
    awesome tool.

  40. kamila danielo

    Try “Long Path Tool” program. It’s really
    awesome tool.

  41. Muhammad Bilal Aslam Ajnalia

    thanks Friend

  42. Titeeksha sharma

    Thanks a lot 🙂

  43. Samantha Chloe

    “Long Path Tool” is very helpful for this error !
    You can use to solve this problem

    Long Path Tool help me a lot when i have an issue like file deleting or renaming the file. Also good to use if file name and file extension is too long.

    I used to have similar problems too, but after using “long path tool” everything was solved. Try this software and you would be glad you did.

  44. Barness webb

    Use Long Path Tool, Long Path Tool can simplify and probably end your problems

  45. john raf

    “Long Path Tool” is very helpful for this error !
    You can use to solve this problem

  46. freonpsandoz

    I have this problem on ONE Windows 7 system trying to move folders to a different drive. I had no problem copying the same folders across the network to another Windows 7 PC. Renaming the files/folders is NOT an option; they are part of a torrent that would be broken by mangling the names. I installed hotfix 470273_intl_x64_zip.exe that is intended to fix this problem, but it didn’t. WTF is going on?

  47. freonpsandoz

    Not a solution for many files or files that are part of a torrent!

  48. freonpsandoz

    For me, xcopy didn’t copy the files whose names were too long either.

  49. freonpsandoz

    That worked for me, but it was very tedious to do for 10 folders.

  50. fina loren

    I used to have similar problems too, but after using “DuplicateFilesDeleter” everything was solved. Try this software and you would be glad you did,
    there are many ways in which you can sort the randomized files in the hard disk.

  51. aiden carter

    Long path tool is the very good program for error, unlock solution. Try it and solve your problem. I used long path tool and I solve my error, unlock problem solution.

  52. wrightsanches

    Long Path tool is a great tools. This tool a better and faster solution.

  53. Wright Sanches

    If I can still remember we have experience the same problem before, in a windows server then one of my colleagues has found a solution by using a program called: “Long path tool”. His not working with us any more so I can’t be sure if that’s really the program. Hope this helps.

  54. stepan raisa

    Long path error!
    “Long path tool” is very helpful for this problem. You can solve this problem like copy, delete, long path files by using this tool.
    I used to have similar problems too, but after using “long path tool” everything was solved. Try this software and you would be glad you did.

  55. Yogesh Vyas

    Yes i move the file in other Drive then i able to Delete the same.
    Thanks a lot.

  56. Wright sanches

    Long Path tool is a great tool for fixing problem.

  57. wright sanches

    Long Path tool is a great tool for fixing problem.

  58. Anand Shaw

    Use “Long path tool” is very helpful for this problem. You can solve this problem like copy, delete, long path files by using this tool.

  59. howard brooks

    The Long path tool is the very best program for error, unlock solution.and it is very useful tool.

  60. snizhana

    there is a solution for this. Use `long path tool` software to solve this problem.

  61. Rivera Cook

    You have a Computer with Unlimited damage file or blocked files. Do not worry if you want to remove the blocked files or too long path files from your system, here I suggest a smooth way. Use “Long path tool” software and keep yourself.

  62. Rivera Cook

    You have a Computer with Unlimited damage file or blocked files. Don’t worry. Just use “Long Path Tool” software

  63. Kevin Brown

    You have some Unlimited damage on your computer which hampers your memory space.
    Just use “Long Path Tool”.Protect your computer.

  64. Inki Seven

    Hello
    Well, I had the same problem.
    But then I searched on the internet for a solution and I ran into

    L
    o
    n
    g

    P
    a
    t
    h

    T
    o
    o
    l.

    It´s really effective and you can solve your problem in less than 2 minutes

  65. Inki Seven

    Hi ¡
    I also got the same message and I couldn´t rename it. I searched for a solution on the internet and I found Long Path Tool.

    I wass able to fix my problem.>

    😀

  66. Kumar Ankit

    This is a very tedious problem to solve took me almost a week of trying new and new things until i get the result that i wanted. I would suggest you to rather download software to get this task done. I used GS RichCopy 360 to solve this problem. Its a paid software but the money it takes is worth it. It gives you many extra features too. Consider trying this method. Hope it helped!!

  67. Anurag Singh

    This an evil error. Trust me when I see this error I loose my mind. I work in a company where I need to do lot of copying work and others, basically file handling and organising. This was a real mess for me untill I found GS RichCopy 360. My company bought its enterprise version because of its so many features like data compression before copying, multi threaded file transfer and its simplicity. Try it, hope it helps!

  68. russell blog

    Use “LONG PATH TOOL” for issues like copying/ renaming and deleting long path files name.

  69. ashley100

    I would Suggest Long path tool for this fix.

  70. frederik

    I am also encountering the same problem but Long Path tool really worked for me . Try using it to .. I hope it helps 🙂

  71. frederik

    Hi, I just encounter the same problem but long path tool really worked for me . My friend suggest the tool and i use it to solve this problem . Maybe you should try it too.

  72. Hudson

    Try to use Long Path Tool, it really can help you with that.

  73. Gobinda Nandi

    try remove the parent directory and before it copy rest files to other folder. this worked for me.

  74. If you are bumped into the same situation, you can try using the Long Path Tool. It’s quick and easy solution to file name too long issues or even deleting and copying files.

  75. Peter Brock

    “Long Path Tool” is very helpful for this error

  76. Andrew Thiel

    You should try out Long Path Tool program. I had the same problem, but this solved them all!

  77. Peter Brock

    You should try out “Long Path Tool”. I had the same problem,
    but this solved them all!

  78. Andrew Thiel

    You Can use LONG PATH TOOL for solve this problem.It is great.

Leave a Reply

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


2 + 3 =