中国DOS联盟论坛

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-04 00:00
48,038 topics / 350,123 posts / today 0 new / 48,251 members
DOS批处理 & 脚本技术(批处理室) » [Help] How to find the path of a certain file and call it
Printable Version  723 / 2
Floor1 hwhan525 Posted 2007-04-04 09:10
初级用户 Posts 31 Credits 82
How do I write this batch file:
That is, on a computer use a batch file to find a certain file (for example: aa.txt) when its exact path is unknown, and then after finding it be able to call the path where this file is located, (for example, if the path of aa.txt is:
D:\TXT\aa.txt, after the batch file finishes running it can make the prompt become: D:\TXT>)

It needs to work under both XP and 98.
Last time platinum member lxmxn already helped me solve it so it could be used normally under XP, but now I've run into the problem that some people have 98 installed and it can't be used, so I'd still like to ask an expert to help me!!


I'm a batch programming newbie! I hope an expert can help me write this batch file!! Many thanks!!!

[ Last edited by hwhan525 on 2007-4-3 at 08:12 PM ]
Floor2 digger Posted 2007-04-04 09:48
初级用户 Posts 29 Credits 79 From 湖南
It is said that under 98 this can't be solved with a pure batch file, so OP should give up on this idea.
Floor3 hwhan525 Posted 2007-04-04 09:51
初级用户 Posts 31 Credits 82
Originally posted by digger at 2007-4-3 08:48 PM:
It is said that under 98 this can't be solved with a pure batch file, so OP should give up on this idea.


Although I'm a bit disappointed, thank you anyway for your advice!!
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023