John Lam 1997 — 2026

Maximum file length limitation in Windows copy command?

Does anyone know if there’s a maximum file length limitation using the copy command in Windows XP?

I was copying around the VS.NET 2003 Beta bits around between different computers on my network last night, and I noticed that the file was consistently corrupted when using the Windows XP copy command. Furthermore, if I used the /V switch to verify the copy, it consistently failed every time.

I tried ruling out lots of stuff (I had just installed a new 100Mbps switch for my home network), which included swapping out the cables, the switches, copying between different computers to rule out network card driver issues, etc.

In desperation, I turned to my good friend, robocopy. When copying the file using robocopy, it worked just fine, and passed the verification pass.

What gives? This file is about 900MB in length. Is there a bug in the XP copy command? It’s reproducible across several machines on my home network.

4 archived reader comments

Serdar Kilic (2002-11-23)

If you drop into the console using command.exe (instead of cmd.exe) it will give the shortname of the files, maybe try copying it around like this ?

Jason Kaczor (2002-11-23)

Did you try using XCopy instead, I’ve found with larger files it works better, as it pages good sized chunks into RAM. I’ve never had file-size be an issue, length of name/path + readonly duplicates at the destination have errored out a few recent transfers. Try using another method. I know this is reasonably inefficent, setup a WebDAV share in IIS, and then connect/copy via WebDAV in Explorer on the client machine.

John Lam (2002-11-24)

I haven’t tried XCopy yet … it would be an interesting experiment. It’s definitely reproducible across several computers. I’ll see if Win2K has this issue as well.

Christian Mogensen (2002-12-11)

It’s a text vs binary thing. COPY defaults to text copies. Therefore it stops when it comes to a ^Z (EOF) marker. XCOPY is always binary. You need to say COPY /B from.foo to.foo to copy the file as binary.