1

Is there a simple command find out the exact location of a file which can be executed from anywhere because it is the PATH? Searching all the directories which are set in the path in order to find it out.. is not very efficient especially if the path contains a lot of directories and all of them are possible candidates...

Thank you

C.L.S
  • 1,250
  • 2
  • 17
  • 31

1 Answers1

1

Perhaps:

WHERE [/R dir] [/Q] [/F] [/T] pattern...

Description: Displays the location of files that match the search pattern. By default, the search is done along the current directory and in the paths specified by the PATH environment variable.

See also the previous SO question Is there an equivalent of 'which' on the Windows command line?.

Community
  • 1
  • 1
Joseph Quinsey
  • 8,830
  • 10
  • 49
  • 71