Remove prompt from output

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
jabadm
Posts: 7
Joined: 14 Oct 2010 10:04

Remove prompt from output

#1 Post by jabadm » 14 Oct 2010 10:32

When echo is on I'd like to have the command displayed without the C:\> (or other drive) prompt. For example, a batch file with a single command:

ren test test01

...will output...

C:\>ren test test01

...when run. I'd much rather not see the prompt C:\> before the command. For me...

ren test test01

...is much cleaner output.

Is this possible in a simple way?

!k
Expert
Posts: 378
Joined: 17 Oct 2009 08:30
Location: Russia

Re: Remove prompt from output

#2 Post by !k » 14 Oct 2010 10:50

Read prompt/?

jabadm
Posts: 7
Joined: 14 Oct 2010 10:04

Re: Remove prompt from output

#3 Post by jabadm » 14 Oct 2010 11:06

I'm sorry for the confusion. by 'prompt' I'm referring to 'C:\>' that prints at the beginning of each line. Is there another name for this piece of the command window?

aGerman
Expert
Posts: 4678
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Remove prompt from output

#4 Post by aGerman » 16 Oct 2010 06:41

!k is right. The PROMPT command is able to change it.
Try
prompt $
to disable the prompt and write
prompt
to return to your default prompt.

Regards
aGerman

jabadm
Posts: 7
Joined: 14 Oct 2010 10:04

Re: Remove prompt from output

#5 Post by jabadm » 16 Oct 2010 06:49

Got it! Thanks so much!

Post Reply