compare word between two files

Microsoft Windows xp professional w/serv...
November 2, 2010 at 04:08:10
Specs: Windows XP, Intel Atom/2GB
I have two files File1 and File2. Both files contain one word. File1 contains Version2.3 and File2 contains Version??
I want a command that would provide a True or False statement. Example:
IF File1:version2.3==File2:?? Echo true ELSE Echo false
AWK seems to be the solution but I don't know how it works.
Thanks

See More: compare word between two files

Report •


#1
November 2, 2010 at 04:36:50
fc File1 File2


=====================================
Life is too important to be taken seriously.

M2


Report •

#2
November 2, 2010 at 06:39:29
Thanks MechanixGo
I used your segestion and came up with
:BEGIN
fc file1.txt file2.txt > nul
IF ERRORLEVEL 1 GOTO RUN

:SAME
GOTO END

:RUN
CALL command.bat

:END
Only if the content of the files are different will it RUN the CALL command.


Report •

#3
November 3, 2010 at 05:15:06
No need to CALL. Nothing to come back for.

======================================

@echo off & setLocal EnableDELAYedeXpansion

fc file1.txt file2.txt > nul
goto :!errorlevel!
:1
theother.bat
:0


=====================================
Life is too important to be taken seriously.

M2


Report •
Related Solutions


Ask Question