Avatar of Danny Kon
Danny Kon
Flag 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

Windows BatchWindows OSScripting Languages

Avatar of undefined
Last Comment
Danny Kon

8/22/2022 - Mon