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-04 01:02
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Help] How to find the path of a certain file and call it View 725 Replies 2
Original Poster Posted 2007-04-04 09:10 ·  中国 福建 福州 电信
初级用户
Credits 82
Posts 31
Joined 2007-03-19 10:38
19-year member
UID 82232
Gender Male
Status Offline
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 ]
Floor 2 Posted 2007-04-04 09:48 ·  中国 广东 电信
初级用户
游荡的孤魂
Credits 79
Posts 29
Joined 2007-04-02 11:08
19-year member
UID 83714
Gender Male
From 湖南
Status Offline
It is said that under 98 this can't be solved with a pure batch file, so OP should give up on this idea.
Floor 3 Posted 2007-04-04 09:51 ·  中国 福建 福州 电信
初级用户
Credits 82
Posts 31
Joined 2007-03-19 10:38
19-year member
UID 82232
Gender Male
Status Offline
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!!
Forum Jump: