|
| You are here: Categories » Computers and technology » Microsoft OS family
|
Batch files are, in essence, command-line commands typed into a text file rather than typed directly at the command prompt. You can tell the command shell to read this text file and interpret its commands as if you were typing them. This serves several purposes:
-
It can save you a lot of typing, as you only need to type the batch file commands once, but you can have Windows run the commands as many times as you want. This is really important with long sequences of commands, but I even more frequently write what I call "tiny handy batch files," with single letter names, and perhaps only one command inside, to do things like change the current directory to a commonly used folder. These batch files can save you quite a bit of time and trouble.
-
You can write the batch file in such a way that it records steps of a particular job without storing the particulars; you can then provide the particulars when you use the batch file. For example, if you repeatedly have to extract and print information from different data files, you might write a batch file that performs these steps but doesn't contain the name of the actual data file to be processed. You can supply that name when you use the batch file. This, again, can save you time and mental energy: After the batch file is written, you don't have to think about what's inside the batch file. It's just a new Windows command that you can use whenever you need.
-
The contents of the batch file serve as a form of documentation, which lists the steps necessary to perform a particular job. A year after you've completed some project, you might have forgotten the steps involved in processing your data files, but you can always read the batch file yourself to refresh your memory.
Batch files can also use primitive programming commands to handle varying situations: "if a particular situation arises, do this, otherwise, do that" or "repeat this step for every file in a certain folder." |
|
Leave a comment or ask a question
|
|
Total comments: 0
Disclaimer
- The e-articles directory is not responsible for any and all copyright infringements by writers and authors. If you suspect the information contained by this page for any copyright infringements, please contact us to investigate the issue
|
|
|
Top Five Tools in Windows 2000 - Here's one IT professional's take on five third-party tools for Windows 2000 every system administrator should have.
There can be no doubt that with every release of Microsoft's opera (more...)
Designing Active Directory for Exchange Server 2007 - Active Directory (AD) is a necessary and fundamental component of any Exchange 2007 implementation. That said, organizations do not necessarily need to panic about setting up Active Directory in (more...)
Delegate Control of an OU to a User - Rather than use the Delegation of Control Wizard, use this script to delegate authority over an organizational unit (OU) to a particular user.
By delegating administrative responsibilit (more...)
Automatically Windows Log On After Booting - It's sometimes convenient to configure machines to log on automatically when booted. Here are three ways to do this.
In all versions of Windows that are based on Windows NT (including W (more...)
Bit Mapped Graphics - Windows marked the transition of the primary operating mode of PC display systems. From character-based displays, Windows ushered in the age of the bit-mapped display. Bit-mapped graphics (more...)
|
|
|