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-08-02 15:29
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Help] How to execute multiple files in the same folder in sequence View 966 Replies 3
Original Poster Posted 2006-12-05 23:08 ·  中国 四川 绵阳 江油市 电信
初级用户
Credits 28
Posts 11
Joined 2006-11-17 23:22
19-year member
UID 70847
Gender Male
Status Offline
I'm new here, and there are a lot of things I don't understand.
The question is as follows:
There are three files in the hello folder: 1.txt, 2.xls, and 3.doc
I need to write a batch file that first executes 1.txt, then 2.xls, and finally 3.doc, without any manual intervention
Floor 2 Posted 2006-12-05 23:25 ·  中国 广东 东莞 电信
银牌会员
★★★
Credits 1,179
Posts 442
Joined 2006-09-09 22:47
19-year member
UID 62249
Status Offline
You can just execute them directly in order. The code below is very simple:
@echo off
start 1.txt
start 2.xls
start 3.doc
@echo on
exit
Floor 3 Posted 2006-12-06 01:37 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline
Floor 4 Posted 2006-12-08 00:15 ·  中国 四川 绵阳 江油市 电信
初级用户
Credits 28
Posts 11
Joined 2006-11-17 23:22
19-year member
UID 70847
Gender Male
Status Offline
Mm, thanks to both of you
Forum Jump: