Generally speaking, batch files (files with the BAT extension such as AUTOEXEC.BAT) are text files that can contain a list of multiple commands to be executed. For example, you could write a BAT file to copy multiple files or change the directory or anything you can do using the "Command/DOS Prompt" commands.
It's very easy to create BAT files:- Go to the "DOS Prompt" or "Command Prompt"
- Type following commands in red line by line (press ENTER after each line):
COPY CON MYBAT.BAT
ECHO Hello, world! This is my test BAT file!
CD C:\WORK\9TO5\FOLDERA
DIR C:\WORK\9TO5\FOLDERA
^Z
Please note that "^Z" is a single character produced by pressing CTRL+Z - Run newly created BAT file by typing "MYBAT" and pressing ENTER.
Although we used the command line to create "MYBAT.BAT" itself, you can create your future BAT files using any text editor. You can then experiment with different commands in your new BAT file.
Comments
Post a Comment