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-11-10 15:32
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Batch File Tricks - Using the CHOICE Command for Time Delay View 4,422 Replies 23
Floor 16 Posted 2004-02-03 00:00 ·  中国 重庆 电信
银牌会员
★★★
Credits 2,202
Posts 499
Joined 2003-06-12 00:00
23-year member
UID 4876
Gender Male
Status Offline
It's like this: I wanted to block execution display, to avoid too many >nul and @echo off lines in the bat, so I used ctty nul at the start. On the screen there was only ctty nul and the cursor (how do you block ctty nul itself?), the contents did execute, but everything was blocked, so how can I get back to the prompt?
The error prompt turned out to be because I had named the batch file itself Ctty.bat, (pure DOS); hehe... but there is an error prompt in XP's CMD, probably because it's a pure DOS command... many thanks!
一年四季,枫叶红了又红;人生四季,失去的,还能再来吗?—— !
Floor 17 Posted 2004-02-03 00:00 ·  中国 山西 运城 联通
元老会员
★★★★
Batchinger
Credits 4,432
Posts 1,512
Joined 2002-10-18 00:00
24-year member
UID 19
Gender Male
Status Offline
Re xiaojun:

Use this to restore display: ctty con
※ Batchinger 致 Bat Fans:请访问 批处理编程的异类 ,欢迎交流与共享批处理编程心得!
Floor 18 Posted 2004-02-03 00:00 ·  中国 重庆 电信
银牌会员
★★★
Credits 2,202
Posts 499
Joined 2003-06-12 00:00
23-year member
UID 4876
Gender Male
Status Offline
Oh, thanks for the help, problem solved...!!!

一年四季,枫叶红了又红;人生四季,失去的,还能再来吗?—— !
Floor 19 Posted 2004-02-03 00:00 ·  中国 香港 有线电视
管理员
★★★★
專業島民
Credits 4,869
Posts 1,633
Joined 2002-12-10 00:00
23-year member
UID 465
Gender Male
Status Offline
The following is quoted from xiaojun at 2004-2-3 14:10:21:
It's like this: I wanted to block execution display , to avoid too many >nul and @echo off lines in the bat, so I used ctty nul at the start. On the screen there was only ctty nul and the cursor (how do you block ctty nul itself?), the contents did execute, but everything was blocked, so how can I get back to the prompt?
Just use @CTTY NUL
我的網站:http://mw16.2ya.com/ 我的網誌: http://scrappedblog.blogspot.com/
~
我的Winamp正在播放的歌曲:
Floor 20 Posted 2004-06-24 00:00 ·  中国 广东 广州 联通
中级用户
★★
Credits 378
Posts 88
Joined 2004-05-05 00:00
22-year member
UID 23815
Gender Male
Status Offline
Take a look! Learn something!
www.51ct.net
Floor 21 Posted 2006-02-27 09:26 ·  中国 浙江 杭州 电信
银牌会员
★★★
Credits 1,582
Posts 603
Joined 2006-02-20 20:26
20-year member
UID 50690
Status Offline
@CTTY NUL can block the screen output when a BAT file is executing!

Then how can you block the screen output when config.sys is loading programs?

A question for all the DOS experts here
Floor 22 Posted 2006-02-27 10:36 ·  中国 北京 顺义区 联通
银牌会员
★★★
DOS联盟捡破烂的
Credits 1,144
Posts 425
Joined 2005-10-20 00:00
21-year member
UID 43784
From 北京
Status Offline
After reading everyone’s discussion here, I learned a few things. In WIN9X, crashes caused by certain devices and device drivers have long been an old loophole, so I might as well mention it here, hehe
CON、NUL、AUX、CLOCK$、CONFIG$
CON\NUL CON\CON NUL\NUL NUL\CON AUX\NUL as soon as any of these are executed, Win9X will immediately hang
CLOCK$ : System clock (system clock) CON : Console (console) AUX : COM1 (serial port) NUL : Dummy Port (null port) CONFIG$ I’m not too clear on this one, so if anyone knows, please tell me. But this loophole is gone in the NT series systems. It seems the reserved names of these devices cause some kind of overflow loophole, hehe
Floor 23 Posted 2006-02-27 17:05 ·  中国 广东 广州 海珠区 电信
中级用户
★★
Credits 466
Posts 237
Joined 2005-10-12 20:53
21-year member
UID 43413
Status Offline
Originally posted by Roy at 2003-8-16 00:00:
Ultimate secret technique!! Force a 10-second delay!!
type nul|choice /c:! /t:!,10 /n Please wait for 10 seconds...

Haha, this is great!

Why does this line sound so much like what Shiryu says in Saint Seiya? (Taste the ultimate secret of the Dragon constellation that can make the Lushan waterfall flow backward — Rozan Shoryu Ha!!!)
Floor 24 Posted 2007-12-02 15:41 ·  中国 湖南 长沙 联通
初级用户
★
Credits 36
Posts 16
Joined 2007-11-27 14:04
18-year member
UID 103938
Gender Male
Status Offline
Try not to use external commands
Forum Jump: