在Windows批处理中,我会做
xcopy source_spec target_spec /d/u/r/y
/d : more recent
/u : only those that exist in target
/r : ignore the read only flag
/y : don't prompt for overwrite
使用powershell copy-item / copy cmdlet等效项最简单的方法是什么。
对于摇动-是的,我知道我可以在powershell中执行xcopy :-)
所以在Powershell中,我这样做:
cmd /c xcopy source_spec target_spec /d/u/r/y
最佳答案
没有写几行脚本就没有直接的等效项。使用xcopy或robocopy。