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-07-23 23:20
中国DOS联盟论坛 » DOS启动盘 & LOGO技术 (启动盘室) » Experts, please take a look at this batch file... View 1,291 Replies 5
Original Poster Posted 2003-12-19 00:00 ·  中国 广东 河源 电信
高级用户
★★
Credits 916
Posts 201
Joined 2003-05-04 00:00
23-year member
UID 1849
Gender Male
Status Offline
In a batch file, I want one file to run and then immediately run another file, like this:
a.exe
b.exe

If I just write them one after another like this, it doesn't seem to work. What parameter should I use in between so that after running a.exe it pauses for a second or two and then runs b.exe?
Floor 2 Posted 2003-12-20 00:00 ·  中国 甘肃 兰州 电信
新手上路
Credits 19
Posts 12
Joined 2003-06-15 00:00
23-year member
UID 5258
Gender Male
Status Offline
Create a .BAT file and use batch commands like IF GOTO.
Floor 3 Posted 2003-12-21 00:00 ·  中国 广东 广州 荔湾区 电信
初级用户
★★★
Credits 1,480
Posts 377
Joined 2003-06-06 00:00
23-year member
UID 3875
Gender Male
Status Offline
Try this: run command /z to find out the return code after a.exe finishes, then
a.exe
if ERRORLEVEL ? b.exe
欢迎大家访问我的主页!
精品.爱好http://iso.533.net
Floor 4 Posted 2003-12-23 00:00 ·  中国 辽宁 沈阳 联通
初级用户
★★
Credits 672
Posts 216
Joined 2003-06-12 00:00
23-year member
UID 4976
Gender Female
Status Offline
It seems there are also some small reposted programs that can do timed pauses. Go take a look at New DOS Age (http://newdos.yginfo.net/).
我是女孩,我怕谁?
Floor 5 Posted 2003-12-26 00:00 ·  中国 山东 烟台 联通
元老会员
★★★★
Batchinger
Credits 4,432
Posts 1,512
Joined 2002-10-18 00:00
23-year member
UID 19
Gender Male
Status Offline
Re walu:

Try:

a.exe
choice /c:q /t:q,1 /n
b.exe


※ Batchinger 致 Bat Fans:请访问 批处理编程的异类 ,欢迎交流与共享批处理编程心得!
Floor 6 Posted 2003-12-28 00:00 ·  中国 辽宁 沈阳 联通
初级用户
★★
Credits 672
Posts 216
Joined 2003-06-12 00:00
23-year member
UID 4976
Gender Female
Status Offline
Right, choice can also be used to control the pause time. Hehe, good thing I didn't forget all of it.
我是女孩,我怕谁?
Forum Jump: