|< Day Day Up >|| |
In this appendix, we will discuss only those commands, switches, and parameters likely to be helpful to those repairing a computer. Because general networking is beyond the scope of this book, networking commands are excluded. In most command references, there is so much punctuation to indicate variables that until you become experienced with the commands, you might have trouble determining which punctuation is for variables and which is part of the syntax of the command. Therefore, we attempted to show these commands with a minimum of punctuation.
Click the icon in the upper left-hand corner of the bar on top of the window, point to Edit in the menu that appears, and click Mark.
Click at the beginning of the text you want to copy.
Press and hold down the <SHIFT> key, and then click at the end of the text you want to copy.
Click the icon again, click Edit, and then click Copy.
Paste the text into a document by holding the <Ctrl> key and pressing <C>, or by selecting Paste from the Edit menu. If you want to paste the text back into the command prompt window, click the icon again, point to Edit, and click Paste.
Wildcard characters can be used when using Windows Search or Find, and to represent multiple files or folders when using a command prompt. Wildcard characters are as follows:
Asterisk (*): Acts as a substitute for zero or more characters. For example, to search for or make a change to any .txt file that starts with G, enter G*.txt. If you want any file that has an extension starting with .tif, enter *.tif. For all files in a particular folder, enter *.*.
Question mark (?): Acts as a substitute for any single character. For example, to search for or make changes to all .doc files that start with Karen followed by a single character, enter karen?.doc. This would find or change karen1.doc, karen2.doc, and so forth, but would ignore karen10.doc because the number 10 has two characters.
For information on commands not listed here, 2000's and XP's Help files have lists of all available prompts. Search 2000's Help for "Command Reference Main Page," or XP's for "Command-Line Reference." For 9x's commands, search the Internet. You can also search Windows' Help for individual commands.
Not all commands are available in all versions. Additionally, certain MS-DOS commands won't be available in 2000 or XP if you access the 32-bit command prompt (Start > Programs (or All Programs) > Accessories > Command Prompt), or by typing "cmd" in the Run dialog. However, if you type "command" in the Run dialog, you'll be able to run some MS-DOS commands that would normally not be available in that version of Windows. Finally, not all commands work as described in Microsoft's documentation.
For a description and syntax of each command, plus a complete list of switches and parameters, enter the command followed by a space and "/?". For example, for information about the CD command, type:
Because folders were originally called directories, Microsoft uses the term whenever writing about commands. The two terms (folders and directories) are interchangeable.
Most of these commands can be used either by entering the full path of the file or folder being acted upon after the command name, or by navigating to that folder first. In our experience, it is usually easier to navigate to the folder first, eliminating any chance of typos invalidating the command and requiring the command to be retyped. For instructions on navigating to the correct folder, see the description of the CD (CHDIR) command.
In addition to the 8.3 limitation of file and folder names in MS-DOS (see Chapter 2, "System Configuration and Computer Hygiene"), there cannot be spaces in MS-DOS file and folder names. When referring to file and folder names containing spaces when using an MS-DOS prompt on Windows, you might need to use quotation marks around the folder or filename. Otherwise, the system might interpret only the first word as the name and anything after that as invalid parameters or switches. This is however, by no means a universal rule, especially in 2000 and XP.
Commands, parameters, and switches are not case sensitive.
All switches must be preceded by a space character when typed as part of a single command line. The only time you would omit the space is when you are responding to a prompt, such as is possible in the CHKDSK command.
Press <Enter> after each command to start it.
A great trick that you can use with these commands is use of the < and > keys. < inputs the text from a text file into a command, and > sends the output from a command to a text file. For example, if you use the DIR command with the /p switch and want the output to go to a file in the current folder that you want to name output.txt, type DIR /p > output.txt
If you want to import text from a file into a command, use the < key after the command and switches, followed by the name of the file.
If you find that commands you want to use are not available, running the PATH command might help. This tells the system where to find commands.
|< Day Day Up >|| |