Link to home
Start Free TrialLog in
Avatar of Danny Kon
Danny KonFlag for Netherlands

asked on

Windows cmd/batch dir command set path as variable

This has to work at windows 7 or higher,
I want a cmd/batch wat will do:

set /p ffile=Give the filename
as example calc.exe
find the first directory where i can execute the calc.exe and set this directory to a variable
That i can use "c:\windows\system32\" in a other batch  

Thanks for your help

Danny
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Danny Kon

ASKER

oBdA

After all these years still here :)

This make me happy 100% perfect

Many thanks

Danny