Getting Around Windows 7 "Destination Path Too Long" Error When Deleting Files

Years ago when I started learning VBA for Excel, I was reading a book by John Walkenbach and he compared learning macros in Excel to using a remote control - once you learn it you don't know how you lived without it. I would say that is true of scripting in general.

The bad news is that programming is also like using a credit card, inasmuch as you can get yourself into a depth of problem just not possible without it.

I got experience with that first hand recently when one small programming mistake caused a bit of a disaster on my computer.


Comments (Comment Moderation is enabled. Your comment will not appear until approved.)

This problem is no longer a considered a hassle because it has been solved.

There is away to fix this problem and the name of that software is LONG PATH TOOL.

I highly recommend it to you since I have already used it.

check it out:
# Posted By Cristopher Neil | 3/12/12 9:19 PM
Yeah, I saw that tool when I was searching for a solution. I just don't like installing extra software on my computer that isn't needed (limited trust, I suppose).

In this case, the solution was simple enough that installing software wasn't necessary.
# Posted By Steve Bryant | 3/13/12 8:57 AM
I like this trick. This trick is good for users who love to play with technical ways. However, I have used “Long Path Tool” in this situation and it helped me easily and quickly. So this tool is best for those members who don't love to play with technical skills.
# Posted By Ethangreg | 3/15/12 2:15 PM
The Long Path Tool is advertised as freeware but you actually need to buy a license to get it to work.
# Posted By David Schulberg | 8/13/12 3:39 AM
I tried this, but I get access denied on the very first iteration. :-( Any other suggesions would be greatly appreciated.
# Posted By KT | 8/24/12 8:13 PM
PS - I own the machine and all the subdirectories and I am local admin on this machine, as well.
# Posted By KT | 8/24/12 8:14 PM

It has been a while since I did this, but you may have to right-click on command prompt and select "Run as administrator" in order for the commands executed from there to have permissions to do this.

Window 7 is kind of weird about that kind of stuff.
# Posted By Steve Bryant | 8/24/12 8:56 PM
every thing said by gabriel nar is fake as fake as his website and softs it's just a scam
# Posted By GabrielNar is fake | 9/21/12 3:54 PM
I believe you are right. I have removed all of those posts and marked that domain as spam internally.


# Posted By Steve Bryant | 9/22/12 12:50 PM
To clear very long name ( with setACL.exe before for rights) use:



result a false copy but that clean up all...

# Posted By Fred | 9/25/12 7:56 AM

result a false copy but that clean up all...

This WORKS! I had Google Drive installed and it made a folder structure that was 705 folders deep! I've been trying to delete them for DAYS, but nothing worked until I used this line in the command prompt (I was running CMD as ADMINISTRATOR, not sure if it mattered). I know this post is old but STILL RELEVANT! Thank you for posting it!
# Posted By Brian | 9/3/14 10:28 AM
It works with Robocopy /MIR with an empty folder as a source:
# Posted By LucaFreide | 8/3/15 1:48 PM
Fastest solution in my own opinion was to go unix. That is, install cygwin terminal and execute " rm -R /path/to/mydirname ", or navigate to your directory and execute without path, you get the idea.
# Posted By Daniel | 8/25/15 7:52 PM
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.
# Posted By kash | 10/1/15 5:28 AM
The above robocopy command worked like a charm! I had a deeply nested folder structure that I wanted to delete without installing anything on company provided equipment. I tried many of the other suggestions found on the web, but the robocopy did the trick.
# Posted By MxP | 3/4/16 10:10 AM
BlogCFC was created by Raymond Camden. This blog is running version 5.8.001.