更新时间:2023-11-27 22:21:40
xcopy.exe 绝对是您的朋友.它内置于 Windows 中,因此它的成本为零.
xcopy.exe is definitely your friend here. It's built into Windows, so its cost is nothing.
只需 xcopy/s c:source d: arget
您可能想要调整一些东西;我们还添加的一些选项包括:
You'd probably want to tweak a few things; some of the options we also add include these:
/s/e
- 递归复制,包括复制空目录./v
- 添加此项以根据原件验证副本.较慢,但对于偏执狂来说./h
- 复制系统和隐藏文件./k
- 将只读属性与文件一起复制.否则,所有文件都变为可读写./x
- 如果您关心权限,您可能需要 /o
或 /x
./y
- 在覆盖现有文件之前不要提示./z
- 如果您认为复制可能会失败并想重新启动它,请使用它.它会在复制的每个文件上放置一个标记,因此您可以重新运行 xcopy 命令以从它停止的地方继续./s/e
- recursive copy, including copying empty directories./v
- add this to verify the copy against the original. slower, but for the paranoid./h
- copy system and hidden files./k
- copy read-only attributes along with files. otherwise, all files become read-write./x
- if you care about permissions, you might want /o
or /x
./y
- don't prompt before overwriting existing files./z
- if you think the copy might fail and you want to restart it, use this. It places a marker on each file as it copies, so you can rerun the xcopy command to pick up from where it left off.如果您认为 xcopy 可能会在中途失败(例如当您通过不稳定的网络连接进行复制时),或者您必须停止它并希望稍后继续,您可以使用 xcopy/s/zc:source d: arget
.
If you think the xcopy might fail partway through (like when you are copying over a flaky network connection), or that you have to stop it and want to continue it later, you can use xcopy /s/z c:source d: arget
.
希望这会有所帮助.