Batch command getting error

Posted by alice7 on Stack Overflow See other posts from Stack Overflow or by alice7
Published on 2010-03-11T23:32:05Z Indexed on 2010/03/12 0:57 UTC
Read the original article Hit count: 278

Filed under:
|
|
|

Hi Guys, I wrote a simple batch file which checks whether the c drive path exists then execute the exe in that path else try the d drive path and execute it.

IF EXIST c:\program files\x goto a 

ELSE goto b


:a
cd c:\program files\x

executable.exe  c:\temp\col.zip 


:b
cd d:\program files\x

executable.exe  c:\temp\col.zip

Im getting this error:

----Error Ouput-- 'ELSE' is not recognized as an internal or external command, operable program or batch file. The system cannot find the path specified. 'executable.exe' is not recognized as an internal or external command, operable program or batch file. 'dellsysteminfo.exe' is not recognized as an internal or external command, operable program or batch file.

I don't know why.

© Stack Overflow or respective owner

Related posts about command-line

Related posts about batch