中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-09-23 16:26
47,812 topics / 349,917 posts / today 0 new / 48,273 members
DOS批处理 & 脚本技术(批处理室) » How to make a batch process pause for five seconds and then continue running
Printable Version  3,515 / 8
Floor1 lin516 Posted 2005-07-19 07:12
新手上路 Posts 1 Credits 7
Under DOS
I want to make some explanatory text I wrote display for 5 seconds (that is, pause for 5 seconds) during batch processing, instead of flashing by, and then automatically run other programs.

Please help the experts! Please write it in detail. I am a novice, thank you!

---------- Edited by willsort ----------
Original title: Help Batch processing
---------- Edited by willsort ----------


[ Last edited by willsort on 2005-8-19 at 16:58 ]
Floor2 JonePeng Posted 2005-07-21 15:52
金牌会员 Posts 1,883 Credits 4,562 From 广东广州
Method 1: Use the choice command:

...
ECHO Hello. Welcome to China DOS Union.
CHOICE /T:Y,5
...

Method 2: Implement delay using the Wait.com program in the MSDOS 7.1 super boot disk:

...
ECHO Hello. Welcome to China DOS Union.
WAIT 5
...
Floor3 brglng Posted 2005-07-21 16:13
银牌会员 Posts 466 Credits 1,200 From 上海
Hehe, I also have a very lazy method, as long as you have Windows installed.
...
ECHO Hello. Welcome to China DOS Union.
dir %windir% /s /a >nul
...
It will take quite a while to dir all the files and subdirectories in %windir% : )
Floor4 JonePeng Posted 2005-07-21 21:07
金牌会员 Posts 1,883 Credits 4,562 From 广东广州
I just tried the method upstairs. It took 15 seconds to do a dir in the DOS mode of Windows. If it's in pure DOS, it would take at least 20 seconds, right?! Sweat -_-|||

This is a relatively stupid method, heh heh. If the batch processing delays every time in this way, people who don't know will think there's a virus doing deltree when they see the hard disk keeps making noise and the hard disk light keeps flashing...
Floor5 pandawy Posted 2005-08-08 16:28
新手上路 Posts 5 Credits 7
Originally posted by JonePeng at 2005-7-21 21:07:
I just tried the method above, and in the DOS mode of Windows, it took 15 seconds to do a dir. If it's in pure DOS, it would take at least 20 seconds?! Sweat -_-|||

This is a relatively stupid method, uh...


Hehe
Floor6 jgty728 Posted 2005-08-16 16:52
初级用户 Posts 10 Credits 24
What does " >nul " mean in the sentence "dir %windir% /s /a >nul"?
Floor7 JonePeng Posted 2005-08-16 22:05
金牌会员 Posts 1,883 Credits 4,562 From 广东广州
Re jgty728:

To indicate not displaying the command output information, ">NUL" is applicable to all commands.
Floor8 Climbing Posted 2005-08-17 14:31
铂金会员 Posts 2,753 Credits 6,962 From 河北保定
Passing by, but I remind the poster to write a good title for the post, such as How to make a batch script pause for five seconds and then continue running.
Floor9 willsort Posted 2005-08-19 18:32
元老会员 Posts 1,512 Credits 4,432
Re lin516:

Please refer to the following link:

{8905}A Strange Case of Batch Programming The Clock topic on floor 4
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023