Link to home
Start Free TrialLog in
Avatar of A S
A S

asked on

batchfile to check version from textfile

hello all,

I have a batchfile to check version from text file, if it matches do something for now

cmd.exe /c type \\version.txt | find /i "14.56"

if it matches to version in text file dont do anything, if it matches run following command

cscript.exe Messagebox.vbs "STOP"

if it doesnot matches run

cscript.exe Messagebox.vbs "Success"

regards
ASKER CERTIFIED SOLUTION
Avatar of NVIT
NVIT
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I'm not sure that the description of what to do is correct, but I would rather use
find /i "14.56" version.txt >nul && (
   REM the version is correct, do something
   set result="Success" 
) || (
   REM if version does not match ...
   set result="STOP"
)

Open in new window

Avatar of A S
A S

ASKER

Thanks