fc myfile1 myfile2
fc /b myfile1 myfile2
fc /c myfile1 myfile2
fc /l myfile1 myfile2
fc /u myfile1 myfile2
Â
Binary compare
Case-insensitive compare
ASCII compare
Unicode compare
compare-object (get-content myfile1) (get-content myfile2)
diff (cat myfile1) (cat myfile2)
If you just need to know whether the files are the same without seeing a report of any differences...
return (Get-FileHash myfile1) -eq (Get-FileHash myfile2)
Returns True if files are the same and False if they are differentYou can also use fc in Powershell but, since fc is a Powershell alias for Format-Custom you wll need to run it using one of these variations...
fc.exe myfile1 myfile2
start cmd "/c ""fc myfile1 myfile2"""
TODO
TODO