Answers for "locate all exe file in powershell"

1

locate all exe file in powershell

#Navigate to the desired directory you want to search
cd C:\
#Then run the command
Get-ChildItem -Filter "*.exe" -Recurse    #or
gci -Filter "*.exe" -Recurse              #the alias for Get-ChildItem is 'gci'

#-Filter "*.exe" is an argument that specifies to only find filenames which end 
#in ".exe". (The * is a type of regular expression notation).
#-Recurse is an argument that specifies to search all child directories. 
#This will make your function run on "C:/", but also all child directories of C:/, 
#and all child directories of those directories and so on. 
#Ommit it if you want to search only that drive.
Posted by: Guest on September-08-2021

Code answers related to "locate all exe file in powershell"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language