Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
IF ELSE Error in Batch file
Name: arun_s010 Date: June 12, 2007 at 22:57:03 Pacific OS: Windows 2003 Server CPU/Ram: 1GB Product: DELL
Comment:
Hi,
I am writing a batch file. I am accepting the parameter from user and trying to display message depending on the parameter entered. Here is the batch file content
@ECHO OFF
SET /P USERPARM=Enter the Value :
IF "%USERPARM%"=="" ECHO Nothing is entered ELSE IF "%USERPARM"=="Y" ECHO Success ELSE IF "USERPARM"=="N" ECHO Failure. ENDIF
But when user enters value instead of displying message command prompt is getting closed. Please let me know if this code has any errors. I am new to batch programming.
Summary: Hi, I want to write a code in batch file. It is like if else statement. There are two variables. Writing in usual language Say Complete=244,Fail=0 if Complete=244 and Fail=0 means goto Pass If complet...
Summary: Thanks you all, but I dont think the problem is caused by the start. So i've tried Razor's method: IF %ERRORLEVEL%==0 goto OK IF %ERRORLEVEL%==3010 goto Restart goto ERROR_SP2Install Normally my batch...
Summary: Hi These subroutines may be useful for calculating date issues in Batch File coding. The sub-rountines use variables a-f so best to not to use them in your calling code. Main varables returned are... ...