开发者

Powershell equivalent to copy the Xcopy only updated files that exist in target

In windows batch I would do

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

What's the simplest using the powershell copy-item/copy cmdlet equivalent.

And to the wags - yes I know I开发者_如何学Python can do xcopy in powershell :-)

so in powershell I do:

cmd /c xcopy source_spec target_spec /d/u/r/y


No there is no straightforward equivalent without writing few lines of script. Use xcopy or robocopy.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜