China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-26 13:36
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » If you want to achieve that running A.bat calls B.bat and then runs C.bat after B.bat is completed. View 2,335 Replies 18
Floor 16 Posted 2007-03-21 02:26 ·  IANA 局域网IP(Private-Use)
初级用户
Credits 30
Posts 13
Joined 2007-03-14 00:28
19-year member
UID 81631
Gender Male
Status Offline
Listening to your words is better than reading ten years of books!
Floor 17 Posted 2007-03-21 02:28 ·  中国 江苏 连云港 电信
高级用户
★★★
前进者
Credits 641
Posts 303
Joined 2007-01-10 02:57
19-year member
UID 76009
Gender Male
Status Offline
Brother lxmxn's usage has been seen, but I just don't know how to use it well. Here, without specifying -w, it's the default that ping once is 1000 milliseconds, right? Then pinging five times is waiting for 4 seconds? It seems I'm very bad at math, heh.

[ Last edited by oilio on 2007-3-20 at 01:33 PM ]
我相信总有一天,总会遇到一个人可以相濡以沫、相吻以湿!
Floor 18 Posted 2007-03-21 02:39 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
19-year member
UID 59080
Status Offline

  Re oilio:

  Basically, it's like this, but this kind of delay is not very accurate. To achieve accurate delay, you need to use VBS or other tools to implement it, such as the sleep.exe command.

  Brother can write a test script for pinging command delay by himself to understand its delay precision, for example:

@echo off
:start_ping
set /p time_ping=Please enter the number of seconds to delay:
set /a time_ping+=1
echo 1-------%time%
ping 127.1 -n %time_ping% >nul 2>nul
echo 2-------%time%
pause&cls&goto start_ping


[ Last edited by lxmxn on 2007-3-20 at 01:45 PM ]
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
oilio +2 2007-03-21 02:53
Floor 19 Posted 2007-03-21 03:00 ·  中国 江苏 连云港 电信
高级用户
★★★
前进者
Credits 641
Posts 303
Joined 2007-01-10 02:57
19-year member
UID 76009
Gender Male
Status Offline
Thanks to brother lxmxn's batch script, I tried it, and there is a little discrepancy. But generally, this is sufficient.
我相信总有一天,总会遇到一个人可以相濡以沫、相吻以湿!
Forum Jump: