James
James

Reputation: 123

Can Cmd determine path location of a .exe or other file type?

I think the best way to ask my question is by giving an example.
This is a question about environmental/user variables.
I am using windows system.
I have the environmental variable: C:\Program Files\Anaconda3\Scripts
I have a file: C:\Program Files\Anaconda3\Scripts\conda.exe
typing "conda" into cmd opens C:\Program Files\Anaconda3\Scripts\conda.exe

my question is:
What if i didn't know the file-path of conda.exe, is there a way for cmd to return:

"C:\Program Files\Anaconda3\Scripts\conda.exe"  

or return"C:\Program Files\Anaconda3\Scripts\"?
Thanks!

Upvotes: 1

Views: 85

Answers (1)

Mureinik
Mureinik

Reputation: 310983

You can use the command to find the location of an executable:

where conda.exe

Upvotes: 4

Related Questions