View Single Post
Old 06-19-2008   #6 (permalink)
Chris Warwick


 
 

Re: Compare-Object and Get the name of object/File?

On Tue, 17 Jun 2008 06:24:01 -0700, /\/\o\/\/ [MVP]
<oMVP@xxxxxx> wrote:
Quote:

>a> I want to compare two directories and copy the files that are not in
Quote:

>> a> directory $A to directory $B.
>
>Another way to do this from PowerShell that might be interesting :
>
>copy c:\test1\*.* c:\test2 -Exclude (dir c:\test2) -WhatIf
>
>Greetings /\/\o\/\/
>
To list the files that would be copied:

robocopy c:\test1 c:\test2 /l

Remove /l to actually copy the files....

:-)




My System SpecsSystem Spec