KB ID 0001396
Source Path Too Long
The source file name(s) are larger than is supported by the file system. Try moving to a location which has a shorter path name, or try renaming to shorter name(s) before attempting this operation.
“Have you come across a problem deleting folders with long filenames?” I got asked this question twice in the first week at a new job. In a former role my colleague did a lot of work in schools and was forever coming across this problem when doing file migrations.
As it transpired this was a problem at, yes you’ve guessed it a school that was a client. The little darlings had got hold of a script that recursively created nested folders, and asВ obviously this is hilarious it had happened multiple times.
I didn’t have a solution of the top of my head, but I thought I’d try and recreate the problem, and see if there was a simple solution.
The most difficult part was replicating the script. Windows is pretty good at protecting itself. But thanks to the good folk at Experts-Exchange’s assistance, I was good to go, attempting to move or delete the file generated the error you see above.
Method One: Use Robocopy
Robocopy has been built into windows for a while, you can use it with the /MIR flag to remove all your subfolders.
Then you can simply delete the two remaining empty folders
Method Two: Use a GUI Tool
I’m always suspicious of third party tools, and if youВ Google this problem two pieces of software will jump out, one’s brilliant does not have any spamware or malware in it, the other one’s, well not free and annoying.
DeleteLongPathВ by BackupChain simple and does exactly what you expect. Take some time to look a their backup software as well!
Message boards are spammed with people saying how great this piece of software is, probably by the clowns who make it! Long Path Tool, they just want your money don’t bother.В
Update: I’ve had about 15 to 20 chancers trying to post favourable comments for this piece of junk, don’t bother i wont approve them!
Related Articles, References, Credits, or External Links
ROBOCOPY /MIR /S worked great to remove a folder with “Source path too long” error.
BTW) the way the folder got created with too long path was I was robocopying a user profile to a network share for roaming profiles. I forgot to use the /XD flag (ignore junction) so it kept creating recursive directories. It also filled up my file server and caused quite a panic.
@nat excatly the same as what happend to me!
I am using robocopy for long time but never thought in this way. hats off to you sir.
Robocopy…I loved the Logic Mate…Saved me a lot of time.
Brilliant! Thanks so much, I spent hours trying to delete one file.
Backup Chain is perfect. Does what you say, no trubba.