select file names without extension

Hi Guys,

Is there anyway to get a list of files in a folder using the get-childItem command but without file extension?

right now I am using “Get-ChildItem | where Length -eq 0 | select -ExpandProperty Name”

but this returns me a list of files named by hostnames so it looks like this:

Computer1.txt

Computer2.txt

etc…

 

I need to have it returned like this:

Computer1

Computer2

etc…

 

so just without extension, is there anyway to do it or do I need to manualy delete every extension?

 

Thanks a Lot!

Get-ChildItem | Select-Object -Property BaseName
You should learn how to search the internet for information! ;-)

yeah sorry, I was looking for it but didn’t find it quick enough so I thought i’d drop it here.

thanks tho :slight_smile: