You can use Powershell to quickly compare two CSV files, and to see which records exist in file A, but not in file B (or vice versa).
We will use the two CSV files below as an example. Note: it is required that records in both files are sorted.
Run “diff” tool via Powershell
- Open up a new Powershell window.
- Navigate to the directory that contains the 2 CSV files.
- Run this command:
diff (cat file1.csv) (cat file2.csv)
- This will give the following output:
InputObject SideIndicator ----------- ------------- record4 <=
The output above indicates that the line “record4” exists in file1.csv, but not in file2.csv.