Hello,
I am coding a batch file. Here is a sample:
if exist rootsys.txt del rootsys.txt
if %lang%==1 (
if %bit%==32 echo C:\Program Files\path\to\the dir>rootsys.txt
if %bit%==64 echo C:\Program Files(x86)\path\to\the dir>rootsys.txt
goto :waset
)
This goes on for six times (so if %lang%==2
etc... to if %lang%==6
.)
So, what it does, the user puts something in, like '6', so it will do the thing for the sixth.
But, whenever i try this, it ends up with \the was unexpected at this time
.
So, i tried debugging with @echo on
. Seemed that it gave me the error at if exist rootsys.txt del rootsys.txt
. How can that happen?!
I am 110% sure i do not mention the
(actually i use this as a sample, it has another name) nowhere else in my batch file. Can anyone help me? I am really stuck here.