Writing a Batch File

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 http://hubpages.com/profile/craftyzen

Happy batching!

More by this Author

Comments 2 comments

pager7 profile image

pager7 6 years ago from Kampala-Uganda

These tips have been very helpful!

Michael T. profile image

Michael T. 6 years ago from Texas

batch files are great for automation

    Sign in or sign up and post using a HubPages Network account.

    0 of 8192 characters used
    Post Comment

    No HTML is allowed in comments, but URLs will be hyperlinked. Comments are not for promoting your articles or other sites.

    Click to Rate This Article