batch file to assign a variable and compare with a string -


i know how achieve this, tried few times no luck.. syntax error

i need write batch file read first line of text, assign variable , compare string.

bool.txt:

hello 

test.bat:

set  variable =< c:\bool.txt if "%variable%"=="hello" echo here 

thanks in advance sr

see help for , help set , try this

 /f %%a in (bool.txt) (      if "%%a"="hello" echo here  ) 

Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -