Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

run named .exe in subdirectory in windows cmd [closed]

Tags:

cmd

I feel stupid for asking this, but here goes. In linux/mac, you can run an executable file in the shell, simply by writing its name. Can you do something similar in windows command line?

Example: I am in directory dir. I want to run a file a.exe in dir/subdir without changing directory to subdir, or writing subdir/a.exe. Is this possible?

like image 775
MyrionSC2 Avatar asked Feb 17 '15 17:02

MyrionSC2


Video Answer


2 Answers

You can using one of the following:

  • "subdir/a.exe"
  • subdir\a.exe
like image 171
Eymen Elkum Avatar answered Oct 19 '22 23:10

Eymen Elkum


You mean you don't want the double-quotes of "subdir/a.exe"? Anyway, if you change to a backslash, it does work; i.e.

subdir\a.exe

like image 23
user2023370 Avatar answered Oct 20 '22 01:10

user2023370