Errorlevel -1073741819 from XCOPY

G

Guest

Hello,

I'm using forfiles to copy the folder contents from one local drive
(C:\Arch) to another local drive (D:\Arch). The command usually runs
perfectly on a directory tree with up to 50,000 files, however the directory
tree currently contains just over 867,000 files. Both the source and the
destination are shared with full control to everyone.

Here is the command:
forfiles -pC:\Arch -s -m2* -d-60 -c"cmd /c if @ISDIR==TRUE xcopy /S /Y
0x22@PATH\@FILE0x22 0x22D:\Arch\@RELPATH\@FILE0x22 & if not %errorlevel%==0
goto ERROR-COPY-FILES"

This is my custom error message showing the value of errorlevel:
***** An error (-1073741819) occurred copying the files to the destination
location (D:\Arch)

Does anyone know what causes the -1073741819 error code from xcopy or
forfiles?

Thanks
 
F

foxidrive

Hello,

I'm using forfiles to copy the folder contents from one local drive
(C:\Arch) to another local drive (D:\Arch). The command usually runs
perfectly on a directory tree with up to 50,000 files, however the directory
tree currently contains just over 867,000 files. Both the source and the
destination are shared with full control to everyone.

Here is the command:
forfiles -pC:\Arch -s -m2* -d-60 -c"cmd /c if @ISDIR==TRUE xcopy /S /Y
0x22@PATH\@FILE0x22 0x22D:\Arch\@RELPATH\@FILE0x22 & if not %errorlevel%==0
goto ERROR-COPY-FILES"

This is my custom error message showing the value of errorlevel:
***** An error (-1073741819) occurred copying the files to the destination
location (D:\Arch)

Does anyone know what causes the -1073741819 error code from xcopy or
forfiles?

Maybe it is from the filename being copied - a different character set
perhaps. Try echoing the filename and pause.

A second thought is that the command line length becomes so long that it
exceeds forfiles or cmds command buffer.

Finally, a diagnostic step might be to create a secondary batch file
instead of running xcopy, and then launch that batch file to do the
xcopying. That will either fail during the creation of the batch file
(forfiles error) or during the batch file run using xcopy, and you can
arrange to see which file it errors on.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top