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-06 07:08
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Why can it only run one program? View 679 Replies 3
Original Poster Posted 2007-10-29 00:38 ·  中国 广东 惠州 电信
初级用户
★★
Credits 126
Posts 53
Joined 2007-02-04 19:21
19-year member
UID 78631
Gender Male
From -
Status Offline
I use P to automatically search for a certain program and run it. But if there are multiple programs with the same name on one drive, it can only run one. If I want all programs with the same name to be run once, how should I modify it..
Here is my P.
for %%a in (c d) do (for /f "tokens=*" %%i in ('dir /s /a-d /b %%a:\r.exe') do (start "" "%%i" ))
Floor 2 Posted 2007-10-29 13:50 ·  中国 四川 南充 电信
超级版主
★★★★
我爱DOS
Credits 5,310
Posts 2,044
Joined 2005-09-26 12:00
20-year member
UID 42843
Gender Male
From 四川南充
Status Offline
Floor 3 Posted 2007-10-29 16:46 ·  中国 广东 惠州 惠城区 联通
初级用户
★★
Credits 126
Posts 53
Joined 2007-02-04 19:21
19-year member
UID 78631
Gender Male
From -
Status Offline
No. For example, if they are under the same drive letter but not in the same directory, it can only run one.. The one in the other directory won't run.

Example: if the same program exists in the two directories king and once
d:\king\r.exe
d:\once\r.exe
Then using this P, it can only run the r.exe program in the king directory. The one in the once directory will not run.
Floor 4 Posted 2007-10-29 17:06 ·  中国 广东 惠州 惠城区 联通
初级用户
★★
Credits 126
Posts 53
Joined 2007-02-04 19:21
19-year member
UID 78631
Gender Male
From -
Status Offline
Heh... heh.. I figured out my problem..
It's a problem with this machine of mine. On other machines it can successfully run all the r.exe programs.
Forum Jump: