copying files that the path is too long

Hi, I have a client that has super deep directories, they can keep making them, but when I try to use Robocopy or GSCopy pro it errors out if the folder path is too deep.

Question, is there a way to copy around files when the data path is super deep?  a command line program would be my first choice, but I'll adapt.

Thanks all.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I think the free utility FastCopy can handle this problem. It has a command-line interface as well.
Joe Winograd, Fellow&MVEDeveloperCommented:
There was a thread about this here at EE last year where this tool was recommended:

I have not tried this myself, but am simply passing it along for your consideration. Regards, Joe
This thread on Tom's Hardware included an allegation that the demo created a long path that could not be removed without purchasing the program. Just sayin'.

I've found that such problematic files can be dealt with successfully by using a DOS window "dir /x" command to obtain the short name. Deleting the file via the short name works. Or rmdir on a problematic folder, once you've emptied it out. But it gets pretty tedious if the folder hierarchy is deep.
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

☠ MASQ ☠Commented:
I'd also caution about longpathtool, this site did get spammed a bit last year by them in threads containing those keywords.

Have you tried using Unicode file naming to copy in Robocopy


Should copy any long path name from C:\Longname
(You need that closing backslash)

\\?\ works because it uses Unicode not Windows file naming
Joe Winograd, Fellow&MVEDeveloperCommented:
Here's the EE thread where Long Path Tool was mentioned:

Lots of other stuff in there. A worthwhile read for anyone with this issue.

And here's another, more recent, Tom's Hardware thread where Long Path Tool was mentioned:

I haven't tried it because my file manager handles long file names just fine. I've been using the excellent Total Commander as my file manager for many, many years:

When trying to copy a too-long-file-name, it gives a dialog saying that the target name length is more than 259 characters and offering to keep the name, keep all, skip the file, skip all, rename, or abort. The release notes from the version that implemented this feature (in 2009) said;
Support for file names longer than 259 characters (up to 1022) in most file operations
Also, to avoid the dialog mentioned above, you may set an option called LongNameCopy in its configuration file, as follows:
LongNameCopy: During file operations, warn if target name is longer than 259 characters:
2=if source name isn't longer than 259 characters
3=disallow long names
Regards, Joe
dbruntonQuid, Me Anxius Sum?  Illegitimi non carborundum.Commented:
Or use the subst command to make the path shorter.


Instead of C:\abaddef\efefefefef\efeefef\eeggg


subst z: C:\abaddef\efefefefef\efeefef\eeggg

and then copy z: across.  Now this depends on your folder structure as to whether that would be satisfactory or not.
Try robocopy again; I know for a fact (that is, I personally copied long paths with it) that it supports long file paths, up until the absolute NTFS limit of about 32000 characters, since and including the version from the W2k3 Resource Kit Tools.
You can just use the regular "robocopy.exe C:\Source\Folder D:\Target\Folder *.* ..." notation.
Make sure you use the version native to Windows Vista or later (in %Systemroot%\system32). If you're stuck with XP, use the one from
And just in case: do not use the /256 option, it will disable the long path support.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
DanOwnerAuthor Commented:
So I'm getting that robocopy will copy as long as I use a trailing "\" in the path?

not c:\data
The trailing backslash has nothing to do with it. In addition, if you need quotes around the path because there's a space in the name, the backslash will escape the closing quote and lead to errors.
Just forget about the long path and let robocopy do its job. It's that easy. Really. Been there, done that.
%Systemroot%\system32\robocopy.exe "C:\Source\Folder" "D:\Target\Folder" *.* /e /r:0 /w:0 ...

Open in new window

The XP010 version of robocopy and higher do indeed not have a problem with long paths.
I would actually use the latest standalone version available which is version XP026.
You can download it here:
The package does also include a GUI.
The GUI does use the installed "robocopy.exe" file.
   ROBOCOPY     ::     Robust File Copy for Windows     ::     Version XP026

You can use this "robocopy.exe" from the command line and also copy the file to another computer and run it from there.

As the utility is very old I'm actualy not sure if the utility installs correctly on Windows 7 and higher. On Windows XP/2003 the setup works fine. The robocopy.exe file can however be used without any problem on Windows 7 and higher.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Legacy OS

From novice to tech pro — start learning today.