詳細的Doskey文件可以參考以下內容或官方文件,我這裡就先講alias(別名修改)基本用法:
以上這行就是教學範例,讓日後 ls 的指令對應 dir。
查看alias,顯示已經取名的命令列表。
最後,要刪除的話,就用 Alt + F10。
以上~教完了!
Microsoft官方文件:http://www.microsoft.com/resourc ... oskey.mspx?mfr=true
Syntax
doskey {/reinstall | /listsize=size | /macros:[{all | exename}] | /history | /insert | /overstrike | /exename=exename | /macrofile=FileName | macroname=[text]}
Parameters
Parameters/reinstall : Installs a new copy of Doskey.exe. Clears the command history buffer. /listsize=size : Specifies the maximum number of commands in the history buffer. /macros : Displays a list of all doskey macros. You can use a redirection symbol (>) with /macros to redirect the list to a file. You can abbreviate /macros to/m. all : Displays doskey macros for all executables. exename : Displays doskey macros for the specified executable. /history : Displays all commands stored in memory. You can use a redirection symbol (>) with /history to redirect the list to a file. You can abbreviate /historyas /h. {/insert | /overstrike} : Specifies whether new text you type is to replace old text. If you use /insert, new text that you type on a line is inserted into old text (that is, as if you pressed the INSERT key). If you use /overstrike, new text replaces old text. The default setting is /overstrike. /exename=exename : Specifies the program (that is, executable) in which the doskey macro runs. /macrofile=FileName : Specifies a file containing macros that you want to install. macroname=[text] : Creates a macro that carries out the commands specified by text. Macroname specifies the name you want to assign to the macro. Textspecifies the commands you want to record. If text is left blank, macroname is cleared of any assigned commands. /? : Displays help at the command prompt. Remarks
The following table lists doskey editing keys and their functions.
LEFT ARROW | Moves the insertion point back one character. | RIGHT ARROW | Moves the insertion point forward one character. | CTRL+LEFT ARROW | Moves the insertion point back one word. | CTRL+RIGHT ARROW | Moves the insertion point forward one word. | HOME | Moves the insertion point to the beginning of the line. | END | Moves the insertion point to the end of the line. | ESC | Clears the command from the display. | F1 | Copies one character from the same column in the template to the same column in the Command Prompt window. (The template is a memory buffer that holds the last command you typed.) | F2 | Searches forward in the template for the next key you type after pressing F2. Doskey.exe inserts the text from the template up to, but not including, the character you specify. | F3 | Copies the remainder of the template to the command line. Doskey.exe begins copying characters from the position in the template that corresponds to the position indicated by the insertion point on the command line. | F4 | Deletes characters from the current insertion point position up to a character you specify. To use this editing key, press F4 and type a character. Doskey.exe deletes the characters from the current insertion point position to the first letter specified. | F5 | Copies the template into the current command line. | F6 | Places an end-of-file character (that is, CTRL+Z) at the current insertion point position. | F7 | Displays all commands for this program stored in memory in a pop-up box. Use the UP ARROW key and the DOWN ARROW key to select the command you want, and press ENTER to run the command. You can also note the sequential number in front of the command and use this number in conjunction with the F9 key. | ALT+F7 | Deletes all commands stored in memory for the current history buffer. | F8 | Displays all commands in the history buffer that start with the characters in the current command. | F9 | Prompts you for a history buffer command number, then displays the command associated with the number you specify. Press ENTER to run the command. To display all the numbers and their associated commands, press F7. | ALT+F10 | Deletes all macro definitions.
|
|