compare

Status
Niet open voor verdere reacties.

Steven111

Nieuwe gebruiker
Lid geworden
11 mrt 2007
Berichten
3
Hey guys, im from LA.
Ive got a problem with some comp codes.. Im working on an IP-Checker for an online-multiplayer game..
The problem is that the comp line only compares the size of the two ".txt" files..
How to compare 2 files @ whats the info in both files?

This is whats in file 1:
Code:
Windows IP Configuration





Ethernet adapter Local Area Connection:



        Connection-specific DNS Suffix  . : lokaal

        IP Address. . . . . . . . . . . . : 192.168.1.33

        Subnet Mask . . . . . . . . . . . : 255.255.255.0

        Default Gateway . . . . . . . . . : 192.168.1.254

And this is whats in file 2:
Code:
Windows IP Configuration





Ethernet adapter Local Area Connection:



        Connection-specific DNS Suffix  . : lokaal

        IP Address. . . . . . . . . . . . : 192.168.1.36

        Subnet Mask . . . . . . . . . . . : 255.255.255.0

        Default Gateway . . . . . . . . . : 192.168.1.254

I need to have everything in it to be compared, for it to see the difference between both IP Addresses [192.168.1.33 - 192.168.1.36]
Only then my ip-checker works.. Ive searched all over google, i cant find what im lookin' for though..


this is a little part of what ive got:
Code:
ipconfig > C:\WINDOWS\Temp\ip.txt
comp C:\WINDOWS\Temp\ip.txt ipm.txt n
if not errorlevel 1 goto fail
goto pass

It always seems to go to pass..
Could you please help me?

- Steven
 
Perhaps just an error in your posting, but I miss a / in
comp C:\WINDOWS\Temp\ip.txt ipm.txt /n

Please give it a try and let me know.


ipconfig > C:\WINDOWS\Temp\ip.txt
comp C:\WINDOWS\Temp\ip.txt ipm.txt /n=10 (or another number)
if not errorlevel 1 goto fail
goto pass
 
Laatst bewerkt:
Thankyou for the quick reaction, but this isn't the problem
the "n" is an automatic input, that's because if I wouldn't add it, it would ask me for a y/n to compare another two files..

[I did try this, but it was no success]
Code:
ipconfig > C:\WINDOWS\Temp\ip.txt
comp C:\WINDOWS\Temp\ip.txt ipm.txt /n
if not errorlevel 1 goto fail
goto pass

Other suggestions? :)

Edit:
Ive tried that, but it doesn't see any difference between both files at all. Here is a screenshot:
compp.png

ipm = ipme
ips = ipsalty (my sister's nickname)
ip = ipconfig logged.
CSM = Control Shooters Mod = The mod for the game i'm making.. (All members in my clan [CS] has an own number, my sister's = 0002)
So if i set as CSM-input: 0002, it will compare the ip.txt (my ip) with the IP of 0002 (Salty) wich is 192.168.1.36.
The image above is the result. :(
Does somebody here know how to compare whats in both files?
 
Laatst bewerkt:
It's not your own program, but try google for WinDiff. If I remember correctly you can also run it from the commandline, so maybe it's possible to integrate it into your software that way...

--Johan
 
Nvm, problem solved.

fc file1 file2 /b

Thnx for the effort <3
 
Laatst bewerkt:
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan