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.
精彩评论