Skip to content

Instantly share code, notes, and snippets.

@valtoni
Created November 23, 2021 12:59
Show Gist options
  • Save valtoni/4993edef7eb56d8b9b81a764d694e1db to your computer and use it in GitHub Desktop.
Save valtoni/4993edef7eb56d8b9b81a764d694e1db to your computer and use it in GitHub Desktop.
Powershell find file in path
:: 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