I could have used something like WinDiff but having been using Linux for a while, thought there should be a command line way to do it :-)
Here's what I found to work;
$d1 = get-childitem -name -path F:/from/directory -recurse
$d2 = get-childitem -name -path T:/target/directory -recurse
compare-object $d1 $d2
1 comment:
I used tis to check after Robocopy copying data from one location to another:
$a = Compare-Object $(dir -Recurse $Path1 | where { $_.PsIsContainer -eq $false } | select Name,DirectoryName,@{Name="SHA512 Hash"; Expression={get-hash $_.FullName -algorithm "sha512" }}) $(dir -Recurse $Path2 | where { $_.PsIsContainer -eq $false } | select Name,DirectoryName, {Name="SHA512 Hash"; Expression={get-hash $_.FullName -algorithm "sha512" }}) -property @("Name","SHA512 Hash")
Post a Comment