More Property Management Options
In the last article, I demonstrated how to use a third-party .NET assembly to update a file’s extended properties. The TagLibSharp assembly works great for media files.
$f = [TagLib.File]::Create("C:\work\circuit-dreams.mp3")
$f.tag.title = "Circuit Dreams"
$f.tag.Year = 2022
$f.tag.Composers = "Jeff Hicks"
$f.tag.Genres = "Techno","Electronic"
$f.Tag.Comment = "This is a computer-generated performance"
$f.Save()
$f.dispose()
But this wouldn’t help you write properties on other file types. While developing, I came across references to a .NET library from Microsoft called the Microsoft.WindowsApiCodePack. I tracked down the necessary packages:
Want to read the full issue?