![]() |
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-09 12:56 |
47,811 topics / 349,895 posts / today 0 new / 48,254 members |
| DOS批处理 & 脚本技术(批处理室) » [Help] How do I run other *.bat files on drive A:? |
| Printable Version 825 / 5 |
| Floor1 beautifulfairy | Posted 2008-08-09 09:37 |
| 新手上路 Posts 4 Credits 10 From 河北省唐山市丰润县 | |
|
How do I run other *.bat files on drive A:?
Give me an example to teach me, okay, everyone who sees this post ![]() And also tell me how I can quickly find posts I've edited myself, thanks [ Last edited by beautifulfairy on 2008-8-9 at 09:50 AM ] |
|
| Floor2 huahua0919 | Posted 2008-08-09 10:55 |
| 银牌会员 Posts 780 Credits 1,608 | |
|
The name of your own batch file is %~nx0. If you use a for loop, you can do it like this
for /f "delims=" %%i in ('dir/a-d/b *.bat') do ( if not "%%i"=="%~nx0" echo %%i ) This filters out running your own program. As for the second question, ask a moderator. |
|
| Floor3 lxmxn | Posted 2008-08-09 20:00 |
| 版主 Posts 4,938 Credits 11,386 | |
|
The answer to the second question is to use the forum's search function.
http://www.cn-dos.net/forum/search.php?searchid=224601&orderby=lastpost&ascdesc=desc&searchsubmit=yes&sid=M875Oy |
|
| Floor4 beautifulfairy | Posted 2008-08-10 08:18 |
| 新手上路 Posts 4 Credits 10 From 河北省唐山市丰润县 | |
Originally posted by huahua0919 at 2008-8-9 10:55: What I mean is how to run it, using call, start, or something like that. |
|
| Floor5 523066680 | Posted 2008-08-10 08:32 |
| 银牌会员 Posts 1,133 Credits 2,362 | |
|
Then just modify it yourself... change echo to Call or Start.
I think the answer in reply #2 is perfect, because this is how you said it: “other *.bat files” What's even more汗 is... you yourself already know about using Call start and so on... and you're still asking |
|
| Floor6 moniuming | Posted 2008-08-10 10:40 |
| 银牌会员 Posts 574 Credits 1,335 From 广西 | |
|
Make it a bit smarter:
|
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |