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-19 10:03
中国DOS联盟论坛 » DOS疑难解答 & 问题讨论 (解答室) » (Solved) How to get the current batch processing path under DOS? View 2,738 Replies 18
Floor 16 Posted 2008-06-26 10:32 ·  中国 河北 保定 联通
铂金会员
★★★★
网络独行侠
Credits 6,962
Posts 2,753
Joined 2003-04-16 00:00
23-year member
UID 1565
Gender Male
From 河北保定
Status Offline
Originally posted by qzwqzw at 2008-6-25 21:55:
Can consider not using strings respectively
Use respectively
dir /s/b %0
and
for %%p in (%path%) do dir /b %%p.\%0
Detect
Most cases where the batch processing is located in the path can be obtained

As for if the standard output ...


The special case we discussed above is that the batch processing is neither in the search path nor on the current disk. Your solution just can't solve all these special cases.
偶只喜欢回答那些标题和描述都很清晰的帖子!
如想解决问题,请认真学习“这个帖子”和“这个帖子”并努力遵守,如果可能,请告诉更多的人!
Floor 17 Posted 2008-06-26 14:05 ·  中国 江西 南昌 电信
银牌会员
★★★
天的白色影子
Credits 2,343
Posts 636
Joined 2004-03-06 00:00
22-year member
UID 19350
Gender Male
Status Offline
Practice, practice!
Did you forget, or did I forget?

Can the command dir /s/b %0 not solve the situation of not being in the current drive?
Floor 18 Posted 2008-06-26 14:30 ·  中国 河北 保定 联通
铂金会员
★★★★
网络独行侠
Credits 6,962
Posts 2,753
Joined 2003-04-16 00:00
23-year member
UID 1565
Gender Male
From 河北保定
Status Offline
What if there are multiple files with the same name?
偶只喜欢回答那些标题和描述都很清晰的帖子!
如想解决问题,请认真学习“这个帖子”和“这个帖子”并努力遵守,如果可能,请告诉更多的人!
Floor 19 Posted 2008-07-01 11:44 ·  中国 山西 电信
银牌会员
★★★
天的白色影子
Credits 2,343
Posts 636
Joined 2004-03-06 00:00
22-year member
UID 19350
Gender Male
Status Offline
Taking only the first line of results will avoid the problem of duplicate files. This is much simpler than taking multiple lines of results.
Forum Jump: