Shaik Shahabuddin
Shaik Shahabuddin

Reputation: 97

Display File Names

I have to fetch and display a particular file name using .

Assume there are 5 files at a particular Location, I need to display each file name.

Upvotes: 5

Views: 10633

Answers (1)

Martin Brandl
Martin Brandl

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

Related Questions