Go Back   TechArena Community > Software > Operating Systems
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: , , ,

Sponsored Links



Batch File Commands

Operating Systems


Reply
 
Thread Tools Search this Thread
  #1  
Old 30-07-2009
Member
 
Join Date: Feb 2009
Posts: 45
Batch File Commands

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
Reply With Quote
  #2  
Old 30-07-2009
shahid khan's Avatar
Member
 
Join Date: Mar 2008
Posts: 212
Re: Batch File Commands

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.
Reply With Quote
  #3  
Old 30-07-2009
Raiz's Avatar
Member
 
Join Date: Dec 2008
Posts: 1,111
Re: Batch File Commands

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"
Reply With Quote
  #4  
Old 30-07-2009
darshit's Avatar
Member
 
Join Date: Mar 2008
Posts: 431
Re: Batch File Commands

@ : 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 :

Quote:
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...
Reply With Quote
Reply

  TechArena Community > Software > Operating Systems


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Batch File Commands"
Thread Thread Starter Forum Replies Last Post
Multiple commands in batch file loop mrgou Vista Help 9 26-04-2011 09:04 PM
Windows Batch file to output directory names and size to txt file m2thearkus Software Development 6 16-07-2010 01:04 AM
How to execute commands of batch file at timed intervals Camryn Software Development 5 27-03-2010 09:47 PM
Batch Commands To Read and Delete Lines from txt-File officer07 Windows Server Help 3 04-03-2009 12:49 PM
Multiple commands for a batch file in a for loop? SANDESH49 Software Development 2 17-02-2009 07:03 PM


All times are GMT +5.5. The time now is 08:22 PM.