Search found 5 matches

by linconnue55
03 Oct 2011 16:14
Forum: DOS Batch Forum
Topic: How to determine the number of difference
Replies: 9
Views: 6516

Re: How to determine the number of difference

Finally I have the solution : @echo off for /F "tokens=*" %%a in ('type file1.txt') do ( find /c "%%a" file2.txt if errorlevel 1 set /a Compt+=1 ) for /F "tokens=*" %%b in ('type file2.txt') do ( find /c "%%b" file1.txt if errorlevel 1 set /a Compt+=1 ) echo l...
by linconnue55
03 Oct 2011 13:56
Forum: DOS Batch Forum
Topic: How to determine the number of difference
Replies: 9
Views: 6516

Re: How to determine the number of difference

I came up with a solution: here is the script: for /F "tokens=*" %%a in ('type file1.txt') do ( find /c "%%a" file2.txt ) Its role is to verify the existence of each line of a first file in a second. it shows the occurrence of each line of file1 into file2. I still just enter thi...
by linconnue55
03 Oct 2011 08:26
Forum: DOS Batch Forum
Topic: How to determine the number of difference
Replies: 9
Views: 6516

Re: How to determine the number of difference

Thanks ,

the idea is to add each line from file1.txt to a variable then browse to find this variable in file2.txt

How done
by linconnue55
03 Oct 2011 07:20
Forum: DOS Batch Forum
Topic: How to determine the number of difference
Replies: 9
Views: 6516

Re: How to determine the number of difference

i know that is the purpose of comp or fc but i need the number of ligne

like the exemple that i mention previously :?:
by linconnue55
03 Oct 2011 03:22
Forum: DOS Batch Forum
Topic: How to determine the number of difference
Replies: 9
Views: 6516

How to determine the number of difference

Hey I need a batch script which compare two text files and determine the number of different ligne. For exemple: file1.txt contains aaaaaa bbbbbb cccccc And file2.txt contains aaaaaa eeeeee bbbbbb cccccc the result of the script must display the number of differences ::-> 1 Thanks for advance.