Compare.cmd - a script for comparing two files

This CMD script compare two files and write the result in "result.txt".
Just add the script in the folder where the two files are and modify to own need at CONFIG area
This commit is contained in:
beerisgood 2020-10-11 17:02:08 +02:00 committed by GitHub
parent 8fc255a1a2
commit f89487aff8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 21 additions and 0 deletions

21
Compare.cmd Normal file
View File

@ -0,0 +1,21 @@
@echo off
:: CONFIG START
:: replace "Top500.txt" with own file
set file1=Top500.txt
:: replace "EU_US_most_common_trackers.txt" with own file
set file2=EU_US_most_common_trackers.txt
:: CONFIG END
cd /d "%~dp0"
echo Compare "%file1%" against "%file2%" ...
for /f "tokens=*" %%i in ('type %file1%') do set domain=%%i&call :loop
echo.&echo Finish&pause&exit
:loop
type %file2%|find "%domain%">nul
if errorlevel 1 echo %domain%>>result.txt
goto :eof