Dada wrote in
Excuse me for my english and for my unclear mex.
I must run a application (for ex. named MyAPP) a server using a
.BAT file, but i don't know the logical letter (C: or D: or ecc..)
where this application is saved; i know the directory name only
(for ex named MyDIR). Ex, if must run MyAPP in MyDIR directory but
i don't know the disk location, how make to run it?
Ex of promt cmd:
C:\ <logical letter>: (i digit the letter driver where
application is saved (??? I don't know..))
<logical letter> cd\ (i go to directory)
<logical letter> cd MyDIR
<logical letter> start MyAPP (I run application and exit)
<logical letter> exit
How make for found <logical letter> where MyDIR is saved?
If I understand correctly then why not just try them all?
IF EXIST C:\mydir\myapp.exe START C:\mydir\myapp.exe
IF EXIST D:\mydir\myapp.exe START D:\mydir\myapp.exe
IF EXIST E:\mydir\myapp.exe START E:\mydir\myapp.exe
...
IF EXIST Z:\mydir\myapp.exe START Z:\mydir\myapp.exe
Or do the same using a FOR statement.
Or other variations of testing all possible
drives/directories/executable file.