I am using the below to pull through metadata from a file structure I am reading. I am also wanting to split out the Name
field to just include the filename without extension. I would use BaseName
but i'm not leveraging Get-ChildItem
so this isn't possible. How would I use PSPath -split
or something similar to put this value in a new column against each file? This is looping through a bunch of files then exporting to a txt file.
Get-FileMetaData -folders 'C:|Pics' -properties Name, Path, Comments, Dimensions, Width, Height | Sort-Object Name |
select Name, Path, Comments, Dimensions, Width, Height | Export-Csv '\\nzsdf01\SCRIPTS\test.txt' -encoding UTF8 -NoTypeInformation