In CMD I can search a file with the following command:
DIR /S /B PROGRAM.EXE
If the file is found the result will be:
C:\Users\Dev\Desktop\Program.exe
I would like to get in the output just the directory without the file name C:\Users\Dev\Desktop\
to assign only the path to a variable.
Is there any way to do this at CMD?