As Mike Nakis said, echo off only prevents printing commands, not results. To hide the result of the command, add >nul to the end of the line and to hide errors add 2>nul . For example:
Del /Q *.tmp >nul 2>nul
Like Christer Andersson , the reason you get the error message is because your variable expands with spaces:
set INSTALL_PATH=C:\My App\Installer if exist %INSTALL_PATH% (
becomes:
if exist C:\My App\Installer (
It means:
If "C: \ My" exists, run "App \ Installer" with "(" as a command line argument.
You see an error because you do not have a folder named "Application". Place quotation marks around the path to prevent this splitting.
Hand-E-Food Jan 11 '12 at 22:13 2012-01-11 22:13
source share