Reputation: 97
I have to fetch and display a particular file name using powershell.
Assume there are 5 files at a particular Location, I need to display each file name.
Upvotes: 5
Views: 10633
Reputation: 58931
You are looking for the Get-ChildItem cmdlet. To get the file name just select the BaseName
property:
Get-ChildItem 'yourPath' | select BaseName
Upvotes: 11