ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel
  • »
  • Technology»
  • Computers & Software

Writing a Batch File

Updated on May 19, 2010

It's batch time!

Have you ever wondered how to use your windows command prompt? Do you feel like you're not geeky enough to learn how to write batch files that can automate daily and probably boring tasks? Well, this article will prove you wrong, and show you how in just a few simple steps. Instead of typing the same commands, you can just double click the batch file and execute the "batch" of commands.

The first step to write a batch file is to open up notepad. Yes, that boring text editor that you've never used. Save your type: "All files" instead of *.txt and add ".bat" to the end of your file name.

Type "@echo off" in the first line, which will prevent the command prompt from displaying the commands as they are being executed. Enter all your commands.
Check out this simple example (copy and paste in Notepad).

@echo off
REM The following will open hubpages in a new Internet Explorer window.
start iexplore.exe

Happy batching!


    0 of 8192 characters used
    Post Comment

    • Michael T. profile image

      Michael T. 7 years ago from Texas

      batch files are great for automation

    • pager7 profile image

      pager7 7 years ago from Kampala-Uganda

      These tips have been very helpful!