(Adapted from "Windows Annoyances" by David A. Karp, O'Reilly & Associates, 1997.)
Several labs in this course require that you type commands into a DOS Window. If you don't quite have a grasp on this concept, here's a crash course on MS-DOS (short for Microsoft Disk Operating System). DOS has been included with PCs since the original IBM 5150 PC in the early 1980s, and even the newest PCs still use it to some extent. DOS was the PC operating system used before Microsoft Windows became the standard and still has some use today. All versions of Microsoft Windows from 1.0 to 3.11 relied on DOS. Windows was thought of only as an extension, as one needed to load DOS before starting Windows. Windows 95, 98 and ME are still based somewhat on MS-DOS for compatibility with the vast majority of available software and Microsoft has made Windows NT, 2000, XP, 2003, Vista, and 2008 completely independent of MS-DOS, but still makes available the command prompt for those who need the functionality.
Rather than unloading Windows to access the command prompt, you simply load another command prompt while remaining in Windows. This is often referred to as a DOS Box or DOS Window. If you don't have a Command Prompt item in your Start Menu, you can use the Start Menu's Run command to execute cmd.exe (or command.com.) You'll see a window that looks like the one shown below in Fig. 2. The cursor indicates the command line (where commands are typed), and the prompt usually shows the current working directory (here, C:\Documents and Settings\CTEC1863).
Fig. 1. Starting a Command Prompt from the Windows XP Start
Menu
Fig. 2. Typical Windows XP Command Prompt Window
To run programs in a DOS box, type the name of the program at the command line (also called the C prompt because it usually looks like C:\>) and press Enter. You should know the following basic DOS commands to be able to complete the labs in this course. The commands are in uppercase, and the parameters (the information you supply to the command) are in lowercase. If there is more than one parameter, each is separated by a space.
CD foldernameChanges the attributes (also called properties) of a file. In Explorer, you can right-click on a file or group of files to change the attributes (R for read only, S for system, A for archive, and H for hidden). ATTRIB is the DOS counterpart to this functionality. In addition, ATTRIB lets you change the S attribute -- something Explorer doesn't let you do. Here are some examples:
ATTRIB +H MYFILE.TXT -- This turns on the "H" parameter for the file myfile.txt.
ATTRIB -R "ANOTHER FILE.DOC" -- This turns off the "R" parameter for the file another file.doc (note the quotes used because of the space in the filename).
Type ATTRIB /? for additional options.
at the
upper right corner of the window, but the EXIT command is safer,
because it means that no other DOS command is currently running.