Computing.Net > Forums > Programming > Batch file question

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.

Batch file question

Reply to Message Icon

Name: rockerest
Date: February 18, 2006 at 16:26:26 Pacific
OS: Windows XP Pro SP2
CPU/Ram: Celeron / 768 MB
Product: Compaq Presario
Comment:

Is there a way for me to make a batch file that displays a message (whatever it may be) character by character? For example, it might display "H", pause for half a second or one second, and then display "e" (on the same line), and continue the process until "Hello" is displayed.

"there are 10 types of people in the world: those who undertsnad binary, and those who don't."



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: February 19, 2006 at 01:30:50 Pacific
Reply:

@echo off
cls
echo H
ping -n 1 -w 1000 1.1>nul
cls
echo He


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

M2


0

Response Number 2
Name: rockerest
Date: February 19, 2006 at 01:56:32 Pacific
Reply:

Thanks very much, I had something similar to the ping line, and I was trying to use it in exactly that way, but the line I found was incorrect in some way. This works perfectly, thanks very much.

-rock

"there are 10 types of people in the world: those who understand binary, and those who don't."


0

Response Number 3
Name: Mechanix2Go
Date: February 19, 2006 at 02:18:49 Pacific
Reply:

Hi rock,

What were you using that failed to do the job?


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

M2


0

Response Number 4
Name: rockerest
Date: February 19, 2006 at 14:32:40 Pacific
Reply:

I was using a "batch file delay" line from the Computer Hope "Batch File Help" page:

TYPE NUL | CHOICE.COM /N /CY /TY,5 >NUL

of course, choice.com was replaced with the name of my batch file, but maybe I didn't understand how to use it correctly?

"there are 10 types of people in the world: those who understand binary, and those who don't."


0

Response Number 5
Name: Mechanix2Go
Date: February 19, 2006 at 18:50:52 Pacific
Reply:

That line works as is.


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

M2


0

Related Posts

See More



Response Number 6
Name: IVO
Date: February 20, 2006 at 03:01:14 Pacific
Reply:

"That line works as is"

but there is no Choice comand in standard Windows XP (both home and pro). You can copy Choice.com from Windows 98, but it suffers glitches in errorlevel codes.

Another way is to download the Windows 2000 version Choice.exe part of the MS Development Kit that can be found on many web sites. It's fully legal and may be very usefull.


0

Response Number 7
Name: Mechanix2Go
Date: February 20, 2006 at 03:31:13 Pacific
Reply:

Hi IVO,

I'm using CHOICE from 98 and using w2k.

What problems have you seen?


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

M2


0

Response Number 8
Name: IVO
Date: February 20, 2006 at 04:21:41 Pacific
Reply:

Hello M2,

I'm using Choice.com under Windows 2000 with (almost) no problem, but porting a script to XP environment I noticed return codes (ErrorLevel) are not always posted correctly.

More there are glitches under Win 2K too when using the default choice after n secs.

So despite a worse display of the pressed key (I'm maniac for the window's look in dialogs) I decided to convert to the NT based version Choice.exe that performs better (almost under Windows XP).


0

Response Number 9
Name: Mechanix2Go
Date: February 20, 2006 at 04:36:03 Pacific
Reply:

Hi IVO,

Got a link to choice.exe?


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

M2


0

Response Number 10
Name: IVO
Date: February 20, 2006 at 07:28:14 Pacific
Reply:

Hi M2,

Check your mail in-box.


0

Response Number 11
Name: Mechanix2Go
Date: February 20, 2006 at 08:54:40 Pacific
Reply:

Hi IVO,

Nothing yet.

Thanks


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

M2


0

Response Number 12
Name: IVO
Date: February 21, 2006 at 03:13:44 Pacific
Reply:

Hi M2,

Did you receive my mail with attached Choice.exe (english version)?

My first sending was rejected as spam for reasons unknown to me, then I enabled your mail server to accept the message and I got back no bad notification.

Please, remember to rename Choice.com to e.g. Choice.co_ before playing with the NT version to avoid confusion.

By the way the Choice.exe is better suited for NT environments and doesn't steal as much processor cycles as Choice.com while waiting for a key input.


0

Response Number 13
Name: Mechanix2Go
Date: February 21, 2006 at 05:02:01 Pacific
Reply:

Hi IVO,

If the attachment was EXE or ZIP it was blocked, as I have filters set.

You can get it through as .EX or .ZI

Thanks


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

M2


0

Response Number 14
Name: IVO
Date: February 21, 2006 at 05:49:07 Pacific
Reply:

Hi M2,

Four minutes ago I tried another shot...as Choice.zi_


0

Response Number 15
Name: Mechanix2Go
Date: February 21, 2006 at 06:11:21 Pacific
Reply:

Hi IVO,

Somehow you got blacklisted; probably when a flurry of crapware broke out a couple months ago.

I think you're clear now.


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

M2


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

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


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Batch file question

Batch File Question - Newbie www.computing.net/answers/programming/batch-file-question-newbie/15511.html

A couple of batch file questions www.computing.net/answers/programming/a-couple-of-batch-file-questions/17648.html

DOS batch files question www.computing.net/answers/programming/dos-batch-files-question/12395.html