set RF_PROPERTIES="%ARCOT_HOME%\conf"
dir %RF_PROPERTIES%
if not exist %RF_PROPERTIES%
goto NO_RF_PROPERTIESThe ARCOT_HOME variable above has spaces. The dir command works and lists the files, but the if command fails with "The syntax of the command is incorrect.". Is there a way to make it work?
Not DOS but try enclosing in double quotes. C:\>if exist "Program Files" echo y
y
=====================================
Life is too important to be taken seriously.M2
How does that help me? I can't hardcode the path, it can be set to any value.
DQ.BAT /A NP L 10 C 1 Ins vt
:: ==========================================
::
:: dq.bat Wed 09-02-2011 19:54:53.67
@echo off & setLocal enableDELAYedeXpansionpushd c:\
set PF=Program Files
if exist "%PF%\Java" echo yep
=====================================
Life is too important to be taken seriously.M2
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |