How to recursively compare two folders for binary differences?

You can user command “./mypowershellscript 2>&1 >>output.txt” and put the following code in your powershell script:


$files = Get-ChildItem "C:\mydev" -recurse
foreach ($f in $files){
$sourcefile1 = $f.FullName
if($f.Mode -ne 'd----')
{
$sourcefile2 = $sourcefile1.replace("mydev","myprod")
fc.exe /b $sourcefile1 $sourcefile2
}
}

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply