--> Skip to main content

Automating Things with Batch Files


They Focus on Today's Computers Too!

If you're knowledgeable about MS-DOS at all, you'll recall that it is a command-driven operating-system that performs functions issued at the C:> prompt. The only path to have an MS-DOS computer to accomplish something was to type a command as of this prompt and if imaginable, it had been an extremely cumbersome way to utilize a computer.
For example, to bunch Microsoft's simple editing program, you'd to type the name of the drive that this system was on, the directory that this system was in, and then a name of the program. So if Microsoft Edit was in a directory or folder named "Process," you might start this system by typing, "C:>process\edit.com" Then, and only then would this system bunch for use.
This can be a small command, but just imagine if you'd a course which was deeply nested within some folder. You can wind up typing a command as wide as your monitor or worse, good enough that the whole command would need to wrap onto the following line! Now imagine being forced to type these long commands each time that you wished to begin a program. Yikes!
That's among why batch files became so popular. Batch files are small text-based documents which contain a number of these commands independently lines. When executed, they'd process each command without the consumer being forced to type each and each one of them.
When Windows was developed, the necessity for typing commands was essentially eradicated as a result of the introduction of the point-and-click (mouse) interface. But this didn't stop the batch file fever that started under MS-DOS - and in certain small circles, batch files remain as popular as these were in the beginning.
Even although you may use Windows XP or Vista, batch files can help you save a lot of time by automatically starting multiple programs and performing different tasks at the single click of a button. They don't really require any extensive programming background and they don't really must be encrypted with some weird, expensive compiler. Batch files are plain text files, and you are able to build one on your own personal use with Windows'Notepad.
You will make an order file that loads up your chosen websites simultaneously for instance, or you will make an order file that fills your desktop with the main applications for the day. To take action only needs a little understanding of the locations of the applications.
Let's say that each day we have to bunch the Yahoo browser, Microsoft Word, and then a calculator that accompany Windows. Instead to do this manually, we're able to write an order file to accomplish it for us.
First, we'd bunch Notepad and key in these:
START "http://www.yahoo.com"
START "c:/program files/microsoft office/office/winword.exe"
START "c:/windows/calc.exe"

We'd then save this data into a document named, "mytasks.bat" onto the Desktop for quick access. Everytime we double-clicked with this file, the Yahoo website would bunch, Microsoft Word would start, and the straightforward calculator would pop up.
Since we would like these programs to load each and every day, we're able to develop a shortcut to the file and then place the shortcut inside our computer's Start Up folder. Like that, these three programs would load each time we switch on the computer. In the event that you wanted these programs to begin minimized, you might type these into an order file instead:
START http://www.yahoo.com /m
START "c:/program files/microsoft office/office/winword.exe" /m
START "c:/windows/calc.exe" /m

This can run all three programs as before, though the "/m" parameter will minimize them so they don't clutter up the desktop.
Others are finding a great deal more creative and effective ways to make use of batch files, but the biggest thing is that you understand they're a source you need to use to save lots of a couple of seconds or minutes in performing important tasks. We've come quite a distance from MS-DOS, but it's still an invaluable supply of automation that everyone can use without programming knowledge at all.

Comment Policy: Silahkan tuliskan komentar Anda yang sesuai dengan topik postingan halaman ini. Komentar yang berisi tautan tidak akan ditampilkan sebelum disetujui.
Buka Komentar
Tutup Komentar