Hello,
I want to create a small batch file, i need the help to create it. What are the Batch File commands? Can anyone explain me with a easy example? Please give me details about it. Thanks
Hello,
I want to create a small batch file, i need the help to create it. What are the Batch File commands? Can anyone explain me with a easy example? Please give me details about it. Thanks
Batch files commands are same as DOS commands. The only difference is Batch file has a collection of DOS commands which run in predefine sequence.
Refer to following threads:
Create a .bat file to get input
How to create a Batch file
Creating Vista Shutdown.bat file
Creating a batch file to launch programs based on time
How Sleep command work on Batch file in Windows
Task Schedule batch file
http://forums.techarena.in/microsoft...ity/946884.htm
Hope this will help. Good luck
The difference between stupidity and genius is that genius has its limits. - Albert Einstein
What we think, we become (Please don't think you are a superhero and don't try to fly)
"SUCCESS IS NOT A DESTINATION , IT'S A JOURNEY"
@ : Does not echo back the text after the at symbol. This is most commonly used as @ECHO OFF to prevent any of the commands in the batch file from being displayed, just the information needed.
More here : Batch commands
The following batch file snippet displays a simple menu (without a question-mark at the end of the prompt) and prompts for the users choice, defaulting to option 2 after 5 seconds :
ECHO 1. MS-DOS Editor.
ECHO 2. MS-Windows. (default)
ECHO 3. Defrag the hard-drive.
ECHO 4. Quit.
CHOICE /C:1234 /N /T:2,5 Please choose a menu option.
IF ERRORLEVEL == 4 GOTO QUIT_MENU
IF ERRORLEVEL == 3 GOTO DEFRAG_HD
IF ERRORLEVEL == 2 GOTO RUN_WIN
IF ERRORLEVEL == 1 GOTO RUN_EDIT
:RUN_EDIT
CALL EDIT
:RUN_WIN
CALL WIN
:DEFRAG_HD
DEFRAG c:
:QUIT_MENU
ECHO Safe to switch off machine now...
Bookmarks