arrays - need a batch to search in all available drives and display a file which is in one or more places -
need windows batch file search in available drives , display file in 1 or more places.
how below thing using array?
my scenario:
- check
drive:/programfiles/test/config.xml
in available drives(a,b,..z). - if file exits in 1 or more place ,list discovered files in
c:/programfiles/test/config.xml
e:/programfiles/test/config.xml
in way has check each , every drive , has display if file there.
- then have choose option list ie 2 use
e:/programfiles/test/config.xml
.
so should return me u have selected e:/programfiles/test/config.xml
.
vijai k
you can iterate on lists of items for
:
for %%d in (c d e f g h ... x y z)
you can check file existing if exist filename
:
if exist %%d:\programfiles\test\config.xml
and use echo
output text:
echo %%d:\programfiles\test\config.xml
this should give enough write batch file yourself.
Comments
Post a Comment