![]() |
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-09-24 03:50 |
47,812 topics / 349,917 posts / today 0 new / 48,274 members |
| DOS批处理 & 脚本技术(批处理室) » The most basic questions are also what novices care about the most |
| Printable Version 2,465 / 17 |
| Floor16 dos9527 | Posted 2006-11-23 10:59 |
| 中级用户 Posts 56 Credits 252 | |
|
The code in FIND.BAT:
for %%a in (*.txt) do @find "baidu" %%a pause exit Runs successfully when placed in %systemboot%\system32\, but not when placed elsewhere |
|
| Floor17 redtek | Posted 2006-11-23 11:04 |
| 金牌会员 Posts 1,147 Credits 2,902 | |
|
Oh, I see. Hehe... Fun~ : )
Why did you name the FIND.BAT batch file the same as the FIND.EXE you want to call except for the extension? When you call it, you don't write their extensions. FIND.BAT and FIND.EXE have different execution priorities~ And it's related to the current directory where you execute the batch file. The system will look for it here first... In this case, there will be very interesting problems : ) If you really don't want to change the batch file name, then you can only do...do @find.exe "baidu" ... Let the Windows system know that you are calling the find.exe file. It's best to rename your find.bat file. [ Last edited by redtek on 2006-11-22 at 10:14 PM ] |
|
| Floor18 dos9527 | Posted 2006-11-23 11:06 |
| 中级用户 Posts 56 Credits 252 | |
|
Thanks, it worked! I thought it would be as complicated to set up as JAVA
|
|
| Prev 1 2 |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |