Discussion Locked

xcopy limitations

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Is there a limitation with xcopy with respect to file/path lengths? I'm trying to generate a batch file to copy data leaving permissions intact however my batch file isn't taking all of the data. It seems after approx. 260 characters it moves on to the next directory that is within the 260 limit leaving several directories not being copied to the new location. Any suggestions? Thanks!

7 replies

by timwalsh

Win32 file APIs permit file paths, including UNC paths, to be up to 260 characters in length.

by shmaltz

Any command line command cannot be longer than 256 characters. If it is it fails. What you have to is make sure that any command in the batch file is not longer than 256 Characters.

This discussion is closed to new replies.