![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-06 08:16 |
48,039 topics / 350,124 posts / today 0 new / 48,251 members |
| DOS批处理 & 脚本技术(批处理室) » Why can it only run one program? |
| Printable Version 681 / 3 |
| Floor1 guo882633 | Posted 2007-10-29 00:38 |
| 初级用户 Posts 53 Credits 126 From - | |
|
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" )) |
|
| Floor2 不得不爱 | Posted 2007-10-29 13:50 |
| 超级版主 Posts 2,044 Credits 5,310 From 四川南充 | |
|
The one above should have achieved the goal, right?
|
|
| Floor3 guo882633 | Posted 2007-10-29 16:46 |
| 初级用户 Posts 53 Credits 126 From - | |
|
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. |
|
| Floor4 guo882633 | Posted 2007-10-29 17:06 |
| 初级用户 Posts 53 Credits 126 From - | |
|
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. |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |