Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Display File Names

Tags:

powershell

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.

like image 834
Shaik Shahabuddin Avatar asked Feb 06 '23 00:02

Shaik Shahabuddin


1 Answers

You are looking for the Get-ChildItem cmdlet. To get the file name just select the BaseName property:

Get-ChildItem 'yourPath' | select BaseName
like image 91
Martin Brandl Avatar answered Feb 08 '23 23:02

Martin Brandl