Saturday, March 5, 2016

Powershell compare two files

$file1=import-csv -path "C:\tech-jockey\test1.csv"
$file2=import-csv -path "C:\tech-jockey\test2.csv"
$r=Compare($file1 $file2)
if ($r -eq 0)
{
write-host "equal"
}
else
{
write-host "not equal"
}

No comments:

Post a Comment

Thanks for showing interest in tech-jockey.

Content of this blog has been moved to GITHUB

Looking at current trends and to make my content more reachable to people, I am moving all the content of my blog https://tech-jockey.blogsp...