Computing.Net > Forums > Disk Operating System > truncated path in dos 6 prompt

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

truncated path in dos 6 prompt

Reply to Message Icon

Name: paulcoleman
Date: November 25, 2005 at 19:54:59 Pacific
OS: dos 6.22
CPU/Ram: Athlon64, 1G
Comment:

Hi all,

I need to find a way to display a truncated working path in the prompt, since the full path can take up quite a bit of room at times. Should I create a variable from the path and truncate the variable somehow (perhaps by parsing backwards character by character until a \ or something)? This seems more complicated than it needs to be!

Ideally, instead of:
prompt [%user%$b$p]$g
[paul|C:\cdp\users\paul\working_cdp\bin]>

I would rather see:
[paul|~bin]>

Any thoughts?! (by the way, my students use different user names to log on, so I really need to display the %user% at the beginning--I know that adds a few characters...)

Any thoughts are greatly appreciated!
Thanks,
Paul



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: November 25, 2005 at 21:15:23 Pacific
Reply:

"This seems more complicated than it needs to be!"

Yeah, but I think you're stuck with parsing it and setting a var.

How to parse? hmmmm

If each user will stay in one dir, life gets easier.



If at first you don't succeed, you're about average.

M2


0

Response Number 2
Name: paulcoleman
Date: November 25, 2005 at 22:56:11 Pacific
Reply:

Right...

I've actually disabled navigation away from their home directories, so I may just create a mask for cd--I could have a fixed path to the user folder with the variable path after (I need to emulate typical cd things . .., etc.).

d:\users\%user%\%usrpath%

If that's the case, I'm already half-way there... I just need to figure out the parsing stuff!

Thanks for the input--I just wanted to make sure I wasn't overlooking a simple solution!


0

Response Number 3
Name: jboy
Date: November 26, 2005 at 00:35:32 Pacific
Reply:

Long pathnames can be assigned drive letters with SUBST

Resist the temptation to close your request for help with semantically-null questions like “Can anyone help me?”


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: truncated path in dos 6 prompt

SCSI CDROM in Dos 6.22 www.computing.net/answers/dos/scsi-cdrom-in-dos-622/6685.html

how do you copy a:\ to C:\ in dos 6.22 www.computing.net/answers/dos/how-do-you-copy-a-to-c-in-dos-622/7709.html

long file names in dos 6.22 www.computing.net/answers/dos/long-file-names-in-dos-622/12511.html