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-21 03:47
中国DOS联盟论坛 » 论坛回收站 » Please provide the specific content that needs to be written into the batch processing so that I can help you translate or write the relevant batch processing content. View 1,575 Replies 2
Original Poster Posted 2009-09-03 15:40 ·  中国 广东 湛江 电信
新手上路
Credits 8
Posts 4
Joined 2008-01-27 11:56
18-year member
UID 109639
Gender Male
Status Offline
If there is no 1.txt on drive C, then run 1.exe and create 1.txt.
If there is 1.txt but no 2.txt on drive C, then run 2.exe and create 2.txt.
If there are both 1.txt and 2.txt on drive C, then exit the batch processing.
I wonder which fellow can help with this? Thanks a lot.
Floor 2 Posted 2009-09-03 16:03 ·  中国 吉林 延边朝鲜族自治州 电信
银牌会员
★★★
正在学习中的菜鸟...
Credits 1,039
Posts 897
Joined 2009-03-01 15:34
17-year member
UID 140302
Gender Male
From 在地狱中仰望天堂
Status Offline
```@echo off
if not exist C:\1.txt (
start C:\1.exe
echo. 2>C:\1.txt
) else (
if exist C:\2.txt (goto :eof) else (
start C:\2.exe
echo. 2>C:\2.txt
))```
Floor 3 Posted 2009-09-03 22:02 ·  中国 广东 湛江 电信
新手上路
Credits 8
Posts 4
Joined 2008-01-27 11:56
18-year member
UID 109639
Gender Male
Status Offline
It seems there is no response when running.
Forum Jump: