I would like to find out which version of an executable the CMD shell uses. In any unix shell, I would use which to find it.
Is there an equivalent command in one of the Windows shells?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Various.
whereis a direct equivalent:Note that in PowerShell
whereitself is an alias forWhere-Object, thus you need to usewhere.exein PowerShell.In
cmdyou can also usefor:In PowerShell you have
Get-Commandand its aliasgcmwhich does the same if you pass an argument (but also works for aliases, cmdlets and functions in PowerShell):The first returned command is the one that would be executed.