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?
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.
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
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

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.
☠ 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
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.
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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.