Jump to content

Command prompt mod to display only...


suryad

Recommended Posts

Well the topic title says it all. I have been using the command prompt a lot and while I have a lot of functionality going on as is possible in the Linux shell prompt, like completion of file/directory names by pressing tab and so on, I was wondering fi any of you knowledgeabl fellas know how to mod the command prompt so I dont get the huge path of the directory I am in but all I get is just the name of the current working directory I am in, for example instead of :

C:\Documents and Settings\username\blah\b;ah\mydir:>

I want

C:\mydir>

I hope that makes sense.

Cheers.

Link to comment
Share on other sites


you can directly edit the environment vairable PROMPT, open a cmd windows and then play some by doing stuff like

set prompt=$P, $T$G

I dont remember the exact ansi character to get just the end of the path, but if you play around then you can figure it out. Also just do something liek

set prompt=$G

Then you get just the basis

Then create a pwd.cmd in the %systemroot\system32 directory that is like this

@ECHO OFF
ECHO %CD%

Then if you forgot where you are then just type pwd to get the present working directory.

Link to comment
Share on other sites

Hey purewaveform, great post thanks a lot man. I will play around with it. Once again thanks for pointing me in the same direction. And anyone in this forum who attempts it and gets it to work please post...some of us are kinda slow eheheh.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...