Saturday 20 October 2012

BATCH FILES DETAILS

How to use Windows BATCH files:

A batch file is a plain text file that contains a number of DOS commands, each of which could be run individually from the command prompt. By putting them into a batch file, they can be run as a group by simply running the batch file.

Note that the commands execute in the order they appear in the batch file, and that anything that causes a command to halt will also halt the batch file. As a workaround you can start several batch files at the same time.

.bat: The first extension used by Microsoft for batch files. This extension runs with MS-DOS and all versions of Windows, under COMMAND.COM or cmd.exe, despite the different ways the two command interpreters execute batch files. 

Batch file ABCs

Batch files allow MS-DOS and Microsoft Windows users to create a lists of commands to run in sequence once the batch file has been executed. For example, a batch file could be used to run frequently run commands, deleting a series of files, moving files, etc. A simple batch file does not require any special programming skills and can be done by users who have a basic understanding of MS-DOS commands.
A good example of a batch file for someone who is more familiar with Windows or the MacOS is to think of a batch file as a shortcut in Windows or an icon on the MacOS. Much like a shortcut, batch files could be used to run one or more commands or programs through the command line.
Another example of a very well known batch file is the autoexec.bat, which is a boot batch file loaded each time the computer boots into MS-DOS and early versions of Windows. This batch file contained all the necessary commands and programs used to run MS-DOS and Windows each time the computer booted.

 

No comments:

Post a Comment