Working at the Command Prompt
Some commands and utilities help you create a better working environment at the command prompt. In many cases, these commands are aesthetic; they don't do any useful work in the sense of modifying a file or the system state. The following sections describe these efficiency commands and utilities.
Redirecting Command Line Output to the Clipboard with the Clip Utility
Anyone who has used redirection knows the benefits of sending output data to another location, such as a file, or getting input from another location, such as the COM port. The Clip utility lets you perform redirection using the Windows Clipboard. You use redirection or the pipe command as you normally do. For example, Dir | Clip sends the output for the directory command to the clipboard. This command uses the following syntax:
Clip
You don't need to supply any command line switches when using this command. It works much like the More command. For example, if you want to place the output of the Dir command on the clipboard, you would type Dir | Clip and press Enter. At this point, you can type Notepad and press Enter to start the Notepad utility. Select Edit → Paste and you'll see the output of the Dir command in Notepad, where you can edit the information to suit your needs.
Clearing the Display with the CLS Command
The Clear Screen (CLS) command clears the screen buffer and presents you with a clean display. All that remains is the command prompt. This command uses the following syntax:
CLS
You don't need to supply any command line switches when using this command.
In this tutorial:
- CMD and BAT Files
- Starting the Command Interpreter
- Using the CMD Switches
- Working with the Command Interpreter in the Registry
- Modifying Config.NT
- Displaying the Config.NT Commands
- Modifying AutoExec.NT
- Saving Memory Using the LH Command
- Defining Application Compatibility with the SetVer Utility
- Using Common DOS Utilities
- Formatting a Disk with the Format Utility
- Terminating a Session Using the Logoff Utility
- Managing Environment Variables with the Set Command
- Managing Environment Variables with the SetX Utility
- Using Debugging Utilities
- Working at the Command Prompt
- Managing Usernames and Passwords with CmdKey
- Changing Screen Colors with the Color Command
- Obtaining Command Line Help with the Help Utility
- Creating Batch Files
- Using the Choice Command
- Using the For Command
- Using the Goto Command
- Using the Prompt Command
- Using the WaitFor Utility