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-22 05:35
中国DOS联盟论坛 » DOS学习入门 & 精彩文章 (教学室) » How do you handle a batch file like this? View 629 Replies 2
Original Poster Posted 2004-01-17 00:00 ·  中国 广东 河源 电信
高级用户
★★
Credits 916
Posts 201
Joined 2003-05-04 00:00
23-year member
UID 1849
Gender Male
Status Offline
The contents of A.BAT are like this:
@echo off
type b.TXT
echo hello
echo bye bye!


As you know, after executing type b.TXT it automatically jumps to the step echo hello. Now I want it, after executing type b.TXT, to directly show the prompt, that is A:\>_ without jumping to the step echo hello. Is there any way?

Using PAUSE can keep it from jumping to the step echo hello, but it cannot show the prompt A:\>_ that is, I can't input anything.
Floor 2 Posted 2004-01-17 00:00 ·  中国 湖北 武汉 联通
银牌会员
★★★
Credits 1,681
Posts 512
Joined 2003-08-02 00:00
22-year member
UID 7953
Gender Male
Status Offline
What do you mean?
If you don't want the echo commands afterward, then just remove them
@echo off
type b.txt

If you want to insert a cmd-mod in the middle, then do it like this
@echo off
type b.txt
command
echo hello
echo bye bye!

When it executes the command step, A:\> will appear, and if you enter exit it will continue executing what follows...
Somehow somewhere I've got to choose.
No matter if it is win or lose.
Floor 3 Posted 2004-01-17 00:00 ·  中国 吉林 四平 联通
初级用户
蝎蛇统领
Credits 280
Posts 35
Joined 2003-05-21 00:00
23-year member
UID 2294
Gender Male
Status Offline
You can do it like this
@echo off
type b.txt
cd\
a
echo hello
echo bye bye!
Give it a try@!
我是菜鸟,我要变成老鸟!
www.10.164.63.101.com
Forum Jump: