2014-01-28 50 views
0

我想將命令行路徑重命名爲一個簡單的命令行路徑,以便我有更多的空間來處理窗口。它也將保持畫面更加整潔我想重命名命令提示符屏幕從長路徑到短路徑或短名稱

我想從

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\x64

C:\NETFXPATH

我在過去那裏瞭解到你發出一個重命名命令提示屏幕命令行ren xyz和屏幕突然變爲c:\xyzxyz,使其易於在屏幕上工作。

我該如何做到這一點?

回答

1

不幸的是,這不可能使用標準的PROMPT命令行。這不是由PROMPT接受選項之一:

J:\>prompt /? 
Changes the cmd.exe command prompt. 

PROMPT [text] 

    text Specifies a new command prompt. 

Prompt can be made up of normal characters and the following special codes: 

    $A & (Ampersand) 
    $B | (pipe) 
    $C ((Left parenthesis) 
    $D Current date 
    $E Escape code (ASCII code 27) 
    $F ) (Right parenthesis) 
    $G > (greater-than sign) 
    $H Backspace (erases previous character) 
    $L < (less-than sign) 
    $N Current drive 
    $P Current drive and path 
    $Q = (equal sign) 
    $S  (space) 
    $T Current time 
    $V Windows version number 
    $_ Carriage return and linefeed 
    $$ $ (dollar sign) 

If Command Extensions are enabled the PROMPT command supports 
the following additional formatting characters: 

    $+ zero or more plus sign (+) characters depending upon the 
     depth of the PUSHD directory stack, one character for each 
     level pushed. 

    $M Displays the remote name associated with the current drive 
     letter or the empty string if current drive is not a network 
     drive. 

你可能有MKLINK解決它通過創建路口縮短文件夾的路徑,或使用SUBST映射文件夾到驅動器號。

0

沒有辦法得到像你的例子。 但是你可以得到一個簡短的提示(沒有任何路徑)與

prompt $g 

這將只顯示「>」 或者如果你只是需要更多的空間來寫你的命令,你可以添加一個換行符提示:

prompt $p$_ $g 

它將顯示路徑(作爲「常規」提示),但從下一行獲取輸入。