Created
November 23, 2021 12:59
-
-
Save valtoni/4993edef7eb56d8b9b81a764d694e1db to your computer and use it in GitHub Desktop.
Powershell find file in path
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: simple version | |
$env:path.Split(';') | gci -Filter application.exe | |
:: expanded version | |
$env:path.Split(';') | select -Unique | ? {$_ -and (test-path $_)} | gci -Filter application.exe |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment