| |
Because a batch file is a way of executing frequently entered DOS commands quicker, it would be a good idea to go over some DOS basics. Since most of us do not use DOS as their primary operating system then we will go over the pure basics. These commands can be used in a batch file anyway.
In previous article there is instruction how to access the command prompt - simply click the Start button in the lower left hand corner of the screen followed by clicking on the Run... option. When you do this, a small box will appear in the lower left hand corner of the screen. To access the command prompt simply type cmd or command.
Now that we have a command prompt up we will open a program. Let's start with the windows calculator. In the black screen you should see something to the extent of C:\> You might have more to it or you might simply have C:> Either way to access the Windows Calculator you simply type calc at this screen. Then hit the enter key on your keyboard. The Windows calculator will pop-up immediately. This is how you are able to open any program from the DOS prompt.
One of the most commonly used DOS commands is DIR. The DIR command allows you to view a list of files that are on the disk. This is how you are able, from DOS, to view which files and folders are on what disk. You are also able to view total files, total directories, and sizes. You will also find the date and time feature helpful.
At this point you probably have a bunch of text on your screen right now. What to do? Thankfully, DOS has a very handy command called CLS. Type CLS into your command prompt and hit enter right now. It clears up the screen. You will find this command very useful when playing with your command prompt.
Back to the DIR command, if that list is too long for you DOS allows you to type DIR /p. Yes, just add a /p to the end of that. At this point remember that some of the DOS commands, batch specific commands, and filenames are in capital lettering. DOS may be case-sensitive.
Performing the command above will display the directory listing but will pause after each screen of information. You will then be told to Press any key to continue . . . and when you press any key, the next group of information, if any, will be shown.
To see a list of filenames only put a /w as an alternative to the /p. The w stands for Wide and gives you a column name-only list display.
You are able to view any drive on your computer. To view the listing for a floppy drive enter:
The letter a is the most commonly used drive letter for the floppy drive. Your floppy drive could possibly be something different if the above did not work. This works for other forms of removable storage as well such as flash drives.
| |
|
| |
|