Glossary

Operating
Systems

Intro
DOS

Win3.X
Win95/98

Click Here For

Free

More DOS Commands...

ATTRIB - Type this at the command prompt and it will display the attributes of the files in the current directory.

A = Archived File

R = Read Only File

S = System File

H = Hidden File

As an example, let's create a file on the root directory of your hard drive. Use the DOS Editor by typing EDIT at the DOS prompt. Type in your name and address and close the Editor by holding down the ALT key and touching the F key. You'll now see a drop down menu with the exit choice at the bottom. Notice that the x in Exit is underlined. Press the x key to exit.When it asks if you want to save, choose yes, and name the file test01.txt and make sure it's saved in the root directory of C: (C:\test01.txt).

Now let's check its attributes. Make sure you are in the root directory of C:. Your DOS prompt will probably look like 'C:\>' .
Type attrib test01.txt at the DOS prompt and press ENTER.

You will see the filename test01.txt with an 'A' in front of it. That 'A' represents the 'archive' bit which changes during the backup process so that DOS knows which files have been backed up.

Now lets add the read-only and hidden attributes. At the DOS prompt type attrib +r +h test01.txt (watch the spaces). Now do a DIR to check the directory. Can you even find your file. No!

Type attrib test01.txt at the DOS prompt and you'll see your file. You'll also notice the 'H' and the 'R' attributes. Try to edit and save the file (edit test01.txt). The contents will show up, you'll be able to make changes, but when you try to save you'll get an error message. Close out the editor (alt+f, x). You also won't be able to delete the file. Now, lets change the attributes back (attrib -h -r test01.txt).
Check the attributes again (attrib test01.txt) then go ahead and delete the file (del test01.txt).

Any file with the 'S','H' or 'R' attribute, will have to have those attributes removed before you can copy, move, delete or make changes to the contents of the file. However, they have these attributes for a reason, so remember to replace the attributes when you're done.

CLS - ClearScreen. This command will clear the screen.

COPY - Copies a file to another destination. Syntax: copy c:\flxtrans.txt c:\backups

This would copy a file called 'flxtrans.txt' from your 'c:\' directory to another directory called 'c:\backups'.

DEL - Delete files. Syntax: del c:\backups\flxtrans.txt

This would delete the file 'flxtrans.txt' from the directory 'c:\backups'. Notice that the entire path was used in the command. This will delete the file flxtrans.txt from the ‘backups’ directory no matter which directory you perform the command from. If the file you want to delete exists in the directory you are currently in (the default directory), then the path is not needed. For example, if you were currently in the ‘backups’ directory (DOS prompt would read C:\BACKUPS>), then you would only have to type the command del flxtrans.txt.

MD - Make Directory. This will make a new directory. You can name it whatever you like. Syntax: md myfiles This will make a new directory (or sub-directory) in the current directory and name it 'myfiles'.

REN - Rename file. You can use this command if you wish to change the name of a file. Syntax: ren oldfile newfile This will rename a file to whatever name you choose; in this case it renames the file 'oldfile' to 'newfile'.

NOTE: Remember the rules for naming files and directories in DOS.

RD - Remove Directory. This is the opposite of the command 'MD'. It will remove a directory from your file system. The directory must be empty (it must not contain any files or subdirectories). Syntax: rd myfiles Removes the directory (or subdirectory in the current directory) called 'myfiles'.

TREE - Displays the directory structure. Type tree at the DOS prompt and it will display a graphical view of all of your directories and subdirectories and the files they contain.

 

DOS UTILITY PROGRAMS...

CHKDSK - CheckDisk. Checks a disk's formatted size and available memory space. It also tells you the amount of disk space consumed by cross-linked files, bad sectors or lost clusters. If any problems are found, you can fix them by typing chkdsk /f at the DOS prompt. In MS DOS Ver 6.0 and later, this function is performed by ScanDisk. Just type scandisk at the DOS prompt.

MSD - Microsoft Diagnostics. Displays information about your computer and it's configuration. Number and size of hard drives, IRQs used, memory allocation, etc..

Type msd at the prompt.

EDIT - A text editor for typing and editing text files. Type edit at the prompt.

HELP - Displays information (use, syntax, etc...) on most DOS commands. Type help at the DOS prompt.

MEM - Displays information on the memory use of your computer. Type mem at the prompt. For a more complete breakdown of memory usage type mem /c/p. The /c switch gives you the more detailed message. The /p switch pauses the scroll so you can view the entire report.

Note: Some DOS commands and utility programs are not available with the Windows 95/98 versions of DOS. Others may give you false information, if you are at the shelled DOS prompt under Win95/98. (clicking on the DOS prompt in Win95/98)

If you want to practice, or use DOS when you have Win95/98 installed, it's best to boot straight to the DOS prompt using the start-up menu.

Windows95
Close out of Windows and turn your computer off. Wait 30 seconds. Turn your computer on and watch the monitor. As soon as you see the line 'Starting Windows 95....' , press the F8 key and you should see the Start-up Menu. Sometimes you have to be fast! If you see the Windows logo coming up, you missed it. Wait for Windows to load, then start again.

From the Start-up Menu, highlight 'Command prompt only', then press ENTER.

Windows98
Close out of Windows and turn your computer off. Wait 30 seconds. Turn your computer on and hold down the CTRL key until the Start-up Menu appears. Highlight 'Command prompt only', then press ENTER.

For those of you that don't know if you're at the shelled DOS prompt or not, just type 'Exit' at the prompt and press ENTER. If you're at the shelled prompt, you'll be returned to Windows. Otherwise, nothing will happen and you can continue with your DOS session.

Important**
If you are at the shelled prompt, you must return to Windows and close out properly before shutting off your computer. This will avoid the possible corruption of files, and seeing scandisk come up next time you turn it on.

If you're at the real DOS prompt, you can either restart your computer by doing a warm boot (ctrl+alt+del), or you can just turn it off.

A good practice to get into when working in DOS, is to always type 'exit' at the DOS prompt, and press ENTER, before you shut off your computer.