Computing.Net > Forums > Windows XP > Batch files just keeps scrolling...

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 files just keeps scrolling...

Reply to Message Icon

Name: narnar2000
Date: April 26, 2004 at 08:57:07 Pacific
OS: XP SP1
CPU/Ram: 2.8/512
Comment:

Hi all,

I want to ping a machine in my LAN. If I run cmd and type

ping 192.168.0.1

it runs fine and I get replies.

If I put that exact command in a text file and call it pingtest.bat and then run the file, a shell opens and the command is run repeatedly, but never allowed to execute to completion; i.e. the shell just keeps scrolling and scrolling like this:

C:\ping 192.168.0.1

C:\ping 192.168.0.1

C:\ping 192.168.0.1

C:\ping 192.168.0.1

C:\ping 192.168.0.1

C:\ping 192.168.0.1

C:\ping 192.168.0.1

C:\ping 192.168.0.1

C:\ping 192.168.0.1

C:\ping 192.168.0.1

C:\ping 192.168.0.1

etc.....

and I need to close the shell or hit CTRL+C to stop it.

Anyone encountered this before and know a way around it?

Thanks,

Paul.



Sponsored Link
Ads by Google

Response Number 1
Name: narnar2000
Date: April 26, 2004 at 09:01:02 Pacific
Reply:

PS: I tried the exact same file on a W2000 machine and it works perfectly...


0

Response Number 2
Name: wanderer
Date: April 26, 2004 at 09:04:37 Pacific
Reply:

the command in the batch should just be ping [ip address]. Looks to me like you have a c:\ in front of it. Put the word exit at the end to close out the cmd window.


0

Response Number 3
Name: narnar2000
Date: April 26, 2004 at 10:29:39 Pacific
Reply:

Hi Wanderer,

thanks for the reply. The C:\ bit was just meant to show what's displayed on the screen - I don't actually type that, I just run it from C:\.

The batch file contains only this line and nothing else:

ping 192.168.0.1

and I get the endless scrolling detailed above.


0

Response Number 4
Name: shauncroucher
Date: April 26, 2004 at 10:36:10 Pacific
Reply:

I have just tried that and it does the same thing for me.

I had a batch file called ping.bat and it has the following in it

ping google.com
pause
exit

I don't know enough about DOS commands to know why this is happening?!

Shaun

Asus A7A266 266FSB
Athlon PX 1800+
512MB DDR266
60GB Deskstar


0

Response Number 5
Name: Rambler
Date: April 26, 2004 at 23:17:26 Pacific
Reply:

You've named your batchfile ping.bat, which looks for an executable PING in the path, starting in the folder it's run from, and of course, it finds ping.bat, and runs it, and so on. Call it something other than the command it runs.

narnar2000 has done something similar, I guess, perhaps he's got a previous attempt called ping.bat.


0

Related Posts

See More



Response Number 6
Name: narnar2000
Date: April 27, 2004 at 02:42:47 Pacific
Reply:

I don't believe it... I actually did have my file named "ping.bat", but I would swear I had tried other file names too...

Talk about a Windows 101 mistake.

Thanks for that, Rambler.


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 Windows XP Forum Home


Sponsored links

Ads by Google


Results for: Batch files just keeps scrolling...

Batch file www.computing.net/answers/windows-xp/batch-file-/155177.html

Counters with FOR in Batch Files www.computing.net/answers/windows-xp/counters-with-for-in-batch-files/165116.html

Batch file Programing Help www.computing.net/answers/windows-xp/batch-file-programing-help/163723.html