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.
You are looking for the Get-ChildItem cmdlet. To get the file name just select the BaseName
property:
Get-ChildItem 'yourPath' | select BaseName
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With