Windows XP command prompt application skills (a)

  
        

Windows XP Command Prompt Tips:

I believe most people are already familiar with Microsoft's Windows operating interface, but not all features must be implemented with it, so even in Windows 2000 and Windows XP still retains a DOS-like command window. Of course, they are different from the previous Windows 9x command window, so there are many special application skills. Let's take a look at the Windows XP command prompt.

Click "Start → Programs → Accessories → Command Prompt" or "Start → Run", then enter "CMD" to enter the command to the prompt state.

1. Using the automatic memory function

The command window has the command memory function. All the command lines you input in the window will be automatically memorized by clicking the up and down direction keys on the keyboard. You can retrieve the commands you just entered one by one, similar to the DOSKEY command in DOS, except that it is built into the command window. This memory function can save you the pain of repeatedly inputting the same instructions. It is especially useful for debugging the network environment, which can save you a lot of repetitive work and valuable time.

2, fun prompt

Do you imagine making your command prompt the current time? Can I display the current Windows XP version number? As long as you want to achieve it. Here we will teach you how to achieve.

Here we use a prompt DOS command, this command has a lot of useful parameters, the detailed parameters of the role of the reader at the prompt to run prompt /? to view. Once you understand the role of these parameters, you can create a file in the installation path, named run.bat, the contents of the folder is prompt $V$D$G$G. Next open the Registry Editor, browse to HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Command Processor\\, and then double-click the AutoRun key on the right to change it to %systemroot%\ un.bat and save the settings to exit. Reopen the command prompt and see if there is a change. In fact, as long as you follow the parameters of the prompt, you can define very rich prompt text.

3, copy the contents of the window

The copy of the string is quite useful for the command window. However, the copy mode of the Windows 2000 and Windows XP command prompts is quite different from the previous version, even if the two are not the same, the former uses the mark copy method, while the latter directly uses the right mouse click copy method. The specific description is as follows:

In Windows XP, for all content, you can directly click on "Select All" in the right mouse button to select, and for the specified range of content, you can first click the right mouse button to select it. "mark" item, then move the mouse to the command character to be copied, drag the mouse to select the string, these strings will immediately appear on the screen in reverse, click the right mouse button or press the Enter key, then move Go to the target location, right click and select "Paste" so that a command string is automatically copied to the specified location.

Under Windows 2000, since the menu of the right mouse button is not supported in the command window (but the drag selection of the mouse is supported), it gives a more concise way to copy the characters with the day command. First, you must hold down the left mouse button and drag the command string to be copied. They will appear on the screen in reverse. Click the right mouse button (ie, perform the copy operation) and move the mouse to the target position. Then tap the left mouse button again and the command characters will be automatically pasted into the new location!

4, change the window characteristics

If you work for a long time under the command


indicator, you can adjust the appearance to suit your own habits, such as its window The title, color, etc. are personalized, and the related commands that are often used are as follows:

a) Change the title: CMD /k TITLE new title name

b) Change the command character: CMD /K PROMPT [text] (text is the new command prompt)

c) Change the foreground and background colors: CMD /t:gf (g is the hexadecimal number specifying the background color, commonly used colors Has the following values: 0 black, 1 blue, 2 green, 3 light green, 4 red, 5 purple, 6 yellow, 7 white, 8 gray, 9 light blue, A light green, B light blue, C light red, D light purple, E light yellow, F bright white.

5, command window shortcuts

There are many useful shortcuts under the command window, which can greatly speed up your input and Debug speed, and some functions are also provided graphically.

ESC: Clear current command line;

F7: Display command history, with graphical list The window form gives all the commands that have been entered, and the up and down arrow keys can be used to select the command again.

F8: Search the history of the command, cycle through all the commands that were entered until the Enter key is pressed. So far;

F9: Select the command by number, and ask you to enter the number corresponding to the command (starting from 0) in the graphical dialog box and display the command on the screen;

Ctrl +H: Delete one character to the left of the cursor;

Ctrl+C Ctrl+Break, forcibly abort the command execution;

Ctrl+M: indicates the carriage return confirmation key;

Alt+F7: Clear all command history that was entered;

Alt+PrintScreen: Capture the contents of the current command window on the screen.

6. Good "color" command line

In the default state, the command line is always black and white, so start from here. Enter cmd in the run dialog, open a command prompt, right click on the title of the open window, in the pop-up menu Select "Properties" and switch the open window to the "Colors" tab, in turn In the screen text, screen background options, and set the corresponding color, note that when we change the settings, it will be displayed in real time below, according to this we can make adjustments according to their own preferences, after saving, the settings will be asked Attribute, select "Save the attribute for use in windows with the same title later", so that it will not take effect only on the current window.

7, quickly select files and folders

At the command prompt, we can press the Tab key to select the files and folders under the current directory, its choice is according to certain In order to carry out the operation, press the Shift+Tab key combination to select the opposite direction, which is very convenient. Note that the file we selected at this time also includes hidden files.

8, save the file list information

Sometimes we need to print out the file list information in a directory on the hard disk, you can use the following method: type the command DIR> C: \\1. Enter after Enter, so the file list of the current directory will be saved to the 1.txt file of the C drive.

Copyright © Windows knowledge All Rights Reserved