Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

$M in PROMPT

Nov
17
0
Is there a way to display the remote name associated with a drive like cmd.exe? In cmd.exe's prompt, $M Displays the remote name associated with the current drive letter or the empty string if current drive is not a network drive.
 
Is there a way to display the remote name associated with a drive like cmd.exe? In cmd.exe's prompt, $M Displays the remote name associated with the current drive letter or the empty string if current drive is not a network drive.

You can embed functions and internal variables in the prompt string, nesting them to create some fairly elaborate effects. Remember to put strong quotes around the definition, or else double the percent signs.

Code:
prompt `%@truename[%_cwd]$g`
Code:
prompt `$P%@if[%@remote[%_disk:] == 1, - %@truename[%_disk:],]$g`
 
holla wrote:

> Is there a way to display the remote name associated with
> a drive like cmd.exe? In cmd.exe's prompt, $M Displays the
> remote name associated with the current drive letter or the
> empty string if current drive is not a network drive.

$M is already used in TCC to display the time.

In TCC, you can use the @TRUENAME and/or @UNC functions in your prompt
to display the remote name.

Rex Conn
JP Software
 
Back
Top