0

DOS – Change your command line prompt

Sometimes you do not want people knowing the current path you work on or from which directory you invoke commands in Windows Command Line (or previously known as DOS). The prompt command allows you to change the command prompt temporarily.

Our Default Prompt

Our default is follow this format [drive]:\

For instance, I have this Windows command line screen.

19-11-2016-2-34-22-pm

Now there is nothing wrong with this. However, when you are in a particular directory you may feel I bit uncomfortable sharing an image (photo) of that screen.

For instance, your Windows user name is shown on this image.

19-11-2016-2-37-35-pm

Another case is when you changed to some other directory and “work” in there.

19-11-2016-2-41-18-pm

Hide your prompt

There is a simple trick in DOS. By using the prompt command, we hide our command prompt.

19-11-2016-2-48-44-pm

Even if you change to another directory, the new location will not be displayed on the screen.

19-11-2016-2-51-19-pm

Karl San Gabriel

Karl San Gabriel

Java and Enterprise Technologies Expert