我对批处理脚本有点陌生。作为一名新手,我发现这两种方法都很有用,在编写脚本时,x拷贝和机器人拷贝之间的主要区别是什么?
发布于 2014-06-09 13:21:18
在新版本的windows中,Robocopy取代了XCopy。
是的,我同意马克·塞切尔的观点,他们都是垃圾。(微软带给你的)
更新:
XCopy返回代码:
0 - Files were copied without error.
1 - No files were found to copy.
2 - The user pressed CTRL+C to terminate xcopy. enough memory or disk space, or you entered an invalid drive name or invalid syntax on the command line.
5 - Disk write error occurred.机器人返回代码:
0 - No errors occurred, and no copying was done. The source and destination directory trees are completely synchronized.
1 - One or more files were copied successfully (that is, new files have arrived).
2 - Some Extra files or directories were detected. No files were copied Examine the output log for details.
3 - (2+1) Some files were copied. Additional files were present. No failure was encountered.
4 - Some Mismatched files or directories were detected. Examine the output log. Some housekeeping may be needed.
5 - (4+1) Some files were copied. Some files were mismatched. No failure was encountered.
6 - (4+2) Additional files and mismatched files exist. No files were copied and no failures were encountered. This means that the files already exist in the destination directory
7 - (4+1+2) Files were copied, a file mismatch was present, and additional files were present.
8 - Some files or directories could not be copied (copy errors occurred and the retry limit was exceeded). Check these errors further.
16 - Serious error. Robocopy did not copy any files. Either a usage error or an error due to insufficient access privileges on the source or destination directories.这里有更多关于Robocopy返回值的详细信息:http://ss64.com/nt/robocopy-exit.html
https://stackoverflow.com/questions/24121046
复制相似问题