Discussion Locked

Xcopy level limit

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
When using xcopy is there a limit to the number of levels it can go down into subdirectories? Since it is a dos command, can it copy anything that goes beyond the 256 character limit?

5 replies

by timwalsh

Linda,
as I answered to your co-worker Dawn, there is no limit to the number of directory levels you can use. But there is a limit to the total path length for any file to be copied. That limit is 260 characters. This is an OS-imposed limit. Itis not specific to any application or utility. Therefore you will not find anything in the MS Knowledge Base that says specifically " xcopy cannot be used on any file whose path exceeds XX characters."

Three KB articles to look at:

245809 - Windows 2000 Supports Fully Qualified Domain Names up to 64 UTF-8 Bytes Long

148754 - File Names Seem to Be Limited to Less Than 255 Characters

172895 - PRB: Path Limit Is 260 Bytes, Not
Characters

And of course, if none of these will convince you, conduct an experiment and try to use xcopy on any file whose total path length exceeds 260 characters.

This discussion is closed to new replies.