Output line of text without line feed

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
xyratest
Posts: 1
Joined: 11 Mar 2008 14:33

Output line of text without line feed

#1 Post by xyratest » 19 Mar 2008 11:14

Is there any way in DOS to output a line of text without a CR/LF (ie with overwrite)? For example I am using a countdown timer that I would like to print out on the same line "Delay 30 Seconds", "Delay 20 Seconds"...overwriting each countdown statement. Thanks.

Chase
Posts: 4
Joined: 09 Mar 2008 12:27

#2 Post by Chase » 27 Mar 2008 17:37

I've seen scripts doing something like this by clearing the whole screen (cls), but that's probably now what you want.
I know for sure that it's possible with command line applications written in C/C++, no idea for batch scripts though

DosItHelp
Expert
Posts: 239
Joined: 18 Feb 2006 19:54

#3 Post by DosItHelp » 28 Mar 2008 20:08

xyratest,

An alternative is to use the TITLE for progress output. The advantage is that you can minimize the batch window and still observe the progress in the task bar, since the task bar text will always reflect the window title text.

Here are two different examples:
http://www.dostips.com/DtCodeSnippets.php#Snippets_ExitDelayed
http://www.dostips.com/DtCodeBatchFiles.php#Batch_Progress
Image
DOS IT HELP? :wink:

Post Reply