GMgKe586q6suSQnyqZLlGCooeWM

Pages

Search

Saturday, December 25, 2010

Batch Basic

Batch file is a file that consift of DOS command. What you can do in command prompt, will also can be done in batch file. Type this code in hello.bat, and then execute it with
C:\hello.bat lady gaga

@ECHO OFF
ECHO hello, %1


To make a variable, type:
SET name=Lady Gaga
echo %name%
PAUSE


IF Statements:
@ECHO OFF
SET a=luna
SET b=luna

IF %a%==%b% GOTO luna

ECHO Sorry, Lady!

:luna
ECHO You may win, Luna!
         
Share/Bookmark

No comments:

Post a Comment