Last active
December 20, 2019 20:42
-
-
Save JohnL4/db2afbe7ffdaf8ba48fa1b377afeae4f to your computer and use it in GitHub Desktop.
Copy files that don't already exist in a destination directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ls | ? {(-not (Test-Path (Join-Path c:\tmp\DirB $_.Name)))} | cp -dest c:\tmp\DirB -pass | |
# Not recursive. | |
# Test-Path can also do date-checking. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment