Results 1 to 4 of 4

Thread: Batch File Commands

  1. #1
    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

  2. #2
    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.

  3. #3
    Join Date
    Dec 2008
    Posts
    1,108

    Re: Batch File Commands

    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"

  4. #4
    Join Date
    Mar 2008
    Posts
    429

    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 :

    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...

Similar Threads

  1. Multiple commands for a batch file in a for loop?
    By SANDESH49 in forum Software Development
    Replies: 4
    Last Post: 08-05-2012, 10:40 AM
  2. Multiple commands in batch file loop
    By Toshaan in forum Vista Help
    Replies: 10
    Last Post: 08-05-2012, 10:39 AM
  3. Windows Batch file to output directory names and size to txt file
    By m2thearkus in forum Software Development
    Replies: 6
    Last Post: 16-07-2010, 12:04 AM
  4. How to execute commands of batch file at timed intervals
    By Camryn in forum Software Development
    Replies: 5
    Last Post: 27-03-2010, 08:47 PM
  5. Batch Commands To Read and Delete Lines from txt-File
    By officer07 in forum Windows Server Help
    Replies: 3
    Last Post: 04-03-2009, 12:49 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,656,945,080.87476 seconds with 17 queries