I need to search and run the program in cmd windows 7. I tried the following code it doesn't seems to pickup the operator when key in together.
START WHERE /R C:\ Program.exe /uninstall
dir /s /b Program.exe /uninstall
Is there another (simpler/better) way to start the program with the operators?
wheresearches files, but does not execute them.start wheredoes nothing but startingwherein a newcmdinstance, sostartrelates towherebut not to the file searched bywhere.dirlists directory contents, but does also not execute anything. Actually you should usedir /S /B C:\Program.exeto searchC:\forPogram.exe; note thatdir /S /B Program.exesearchesProgram.exein the current working directory (recursively).The
/uninstallswitch is considered as part of thewhereor thedircommand line as you stated it.You need to split your task into two phases:
Program.exeinC:\recursively;Program.exeusing the option/uninstall;Here is how it could work using
where:Here is a way using
dir(the/A:-Doption has been added to not return directories calledProgram.exe):If there are more files called
Program.exeinC:\, all of them are executed.