logo
down
shadow

how do i compare two files using a batch script with a count of differences


how do i compare two files using a batch script with a count of differences

By : Surbhi Gupta
Date : November 25 2020, 07:22 PM
hop of those help? I have two files file1 and file2.
code :


Share : facebook icon twitter icon
find list of differences in two text files batch script

find list of differences in two text files batch script


By : Rollo_Serpentine
Date : March 29 2020, 07:55 AM
this will help Hers is what I am trying to do. I have LISTa(data.txt) which contains a list of data and LISTb(has.txt) which contains another list of data. I want to compare LISTa(data.txt) to LISTb(has.txt) and to determine what from LISTa(data.txt) is not in LISTb(has.txt). I have tried the following with no success. I think it is because both list contain numbers.
code :
Findstr /b /e /ivg:"%home%\has.txt" "%home%\data.txt" > %home%\final.txt
Compare two files and get only the differences - shell script

Compare two files and get only the differences - shell script


By : Brian Murphy
Date : March 29 2020, 07:55 AM
To fix this issue I have two files. The first one has a lot of ID and the second one has some ID too. I want to know which ID of the second file doesn't exist in the first one. , grep can read patterns from a file using the option -f:
code :
grep -vFf total.log second.log
Batch file to compare the differences in two csv files

Batch file to compare the differences in two csv files


By : sashraf
Date : March 29 2020, 07:55 AM
this one helps. You can use findstr to look for differences, and the /v parameter to display differences. Like so:
code :
findstr /v /g:"file1.csv" "file2.csv"
for /f "delims=" %%a in (file1.csv) do (
    findstr "^%%a$" "file2.csv" >nul ||echo %%a
)
fc "file1.csv" "file2.csv"
Script to compare/contrast two separate Excel files - export differences for both

Script to compare/contrast two separate Excel files - export differences for both


By : bruce yardy
Date : March 29 2020, 07:55 AM
will be helpful for those in need To be honest this is the kind of task I wouldn't even consider worthy of writing a script for. Instead, it seems much simpler just to use the =COUNTIF() function on each file, within the Excel worksheet, to check if each name appears in the other one.
So what you'd end up with is a list of people in each file where =COUNTIF(list in other worksheet, person's name) = 1. This is your list of people which are common between both files. You'd also have a number of them where the same COUNTIF = 0, these are your unique entries.
Python script to compare two CSV files with same rows for new lines/differences

Python script to compare two CSV files with same rows for new lines/differences


By : Ahmed Abdelgalil Hag
Date : March 29 2020, 07:55 AM
Any of those help I have a python script with nmap to run monthly to check open ports.this is how the csv file looks like: , If you are open to using pandas this will do it:
code :
import pandas as pd

old = pd.read_csv('old.csv', sep=';')
new = pd.read_csv('new.csv', sep=';')
final = new[~new.isin(old)].dropna()
final.to_csv('diff.csv', sep=';')
shadow
Privacy Policy - Terms - Contact Us © ourworld-yourmove.org