I know little about DOS.
When I run a command like "ping xyz.com" from Start|Run, I get the report, but the DOS window closes before I can absorb the data. I can click the Pause button, but it is hard to time correctly. I either click too early and miss some of the last parts of the data, or too late and the window has already closed.
Is there some switch I can use with the Run command to keep the window open when the report is finished?
Also is there a different switch to keep page one of data paused, before the scrolling goes on to page two?
P.S. Maybe I cannot do from Start|Run and have to use MS-DOS Prompt?? If so, please tell me the switch to use to keep the window from scrolling page to two before I have read page one. And if page one is paused how do I go on to page two and stop before going to page three?
Thanks!!
Last edited by Welshjim; February 19th, 2003 at 04:17 PM.
Jim
WIN7 Ultimate SP1 64bit, IE 11, NTFS,
cable, MS Security Essentials, Windows 7 firewall
You could try selecting 'MS-DOS Prompt' or 'Command Prompt' from the Start menu, or use Start, Run, and enter 'Command' into the Run box. The resulting window won't close until you type 'Exit'.
I tried ping /? from
1) Start|Run
2) MS-DOS Prompt and
3) Start|Run|type command|click Enter|type ping /? at prompt in next window.
All return "Unknown Host ?" The result from #1 flashed only for a moment, as before.
Jim
WIN7 Ultimate SP1 64bit, IE 11, NTFS,
cable, MS Security Essentials, Windows 7 firewall
The ping /? works as it should with mine. Maybe a corrupted ping.exe?
I believe the -t switch listed below is what you are looking for.
Options:
-t Ping the specified host until stopped.
To see statistics and continue - type Control-Break
To stop - type Control-C.
-a Resolve addresses to hostnames.
-n count Number of echo requests to send.
-l size Send buffer size.
-f Set Don't Fragment flag in packet.
-i TTL Time To Live.
-v TOS Type Of Service.
-r count Record route for count hops.
-s count Timestamp for count hops.
-j host-list Loose source route along host-list.
-k host-list Strict source route along host-list.
-w timeout Timeout in milliseconds to wait for each reply.
Vernon Frazee--Thanks for the graphic. I went to my DOS-Prompt, entered and produced the two lines as follows
"C:\>ping/?
Unknown host /?."
I also tried ping /? (a space between ping and the /). Same result.
You have seen the other three attempts made above. So I am at loss to know how to do.
markp62--ping xyz.com works fine in providing data. Just flashes for only a moment and then disappears unless I click the Pause button, as stated in first post. Seems to suggest my ping.exe is working OK?
Jim
WIN7 Ultimate SP1 64bit, IE 11, NTFS,
cable, MS Security Essentials, Windows 7 firewall
Create a batch file called pingtest.bat with the following lines:
ping %1
pause
exit
Then, from Start, Run enter pingtest xyz.com
That should get the DOS window to pause for you.
I'm not sure if that will really fix your problem, since I don't know if you are wanting the DOS window to stay open for any command or just that one. As I mentioned earlier, a command window or DOS window created from Start, Run will not normally stay open for you to see the results when the command is finished.
jdc2000--Created and clicked on that pingbat.bat program. I got a DOS Window that scrolls indefinitely with the single line
"C:\WINDOWS\Desktop>ping" repeated over and over.
(I had to click Pause to stop it.)
Then went to Start|Run|typed pingtest xyz.com|Enter and got an error message to the effect the file "pingtest" could not be found.
Thanks for sticking with me, anyway!
What I want is to be able to read the results of a ping test.
From Start|Run, I get the data but the window closes before I can read much. From MS-DOS Prompt I get the data, but only one window's worth when the data fills more than one window. The first window of data rapidly scrolls to a second or third and only the last window of data remains.
EDIT--I have been thinking over the list of switches which Vernon Frazee and markp62 kindly provided, and maybe the answer is that the ping command from Start|Run does not support a "keep window open" switch?? But then in MS-DOS Prompt how do I go from second window to first or back?
Last edited by Welshjim; February 21st, 2003 at 02:51 PM.
Jim
WIN7 Ultimate SP1 64bit, IE 11, NTFS,
cable, MS Security Essentials, Windows 7 firewall
You, of course, have to have an address to ping. Try:
ping 00.00.00.00 >pingfile.txt
Put an address to ping in place of those zeros. Add switches as desired. This will put the results in the file pingfile.txt
------------------
My
Two Cents
Dennis
Visit Politalk
Try the attached batch file instead. Note that you can't just double click on it, since you need to supply the location to ping as a parameter. Also, you need to put the pingtest.bat file in a folder that is part of your default PATH, like C:\WINDOWS\ or C:\WINNT\
Note: The forums will not allow uploading a .bat file, so you will have to rename the pingtest.txt file to pingtest.bat after downloading it.
jdc2000--I warned you that I know little about DOS!!
It turns out that your original pingtest.bat file works just fine from Start|Run when I follow your original instructions exactly and follow them sequentially instead of separately!! DUH!!
OK, so now I can get the DOS Window to stay up and not disappear. Thank you!!
If I get a DOS window with the second page of data, is there a switch to toggle back and forth between the first and second DOS pages?
Thanks, also to eeyore. Your message helped emphasize that I had not properly followed jdc2000's instructions.
Last edited by Welshjim; February 21st, 2003 at 09:02 PM.
Jim
WIN7 Ultimate SP1 64bit, IE 11, NTFS,
cable, MS Security Essentials, Windows 7 firewall
Depending on your version of DOS / Windows, you can pipe your output through the MORE command to get it to pause when the window fills up with lines. Some commands also have their own built in switches for this. Try the following from a command prompt to see what happens.