Edit file details windows 10

broken image

$folder.ParseName((Split-Path -Leaf $file)), # Output the value of the 'Comments' property. $folder = (New-Object -ComObject Shell.Application).NameSpace((Split-Path $file))

broken image

You can only read such properties programmatically in an application-independent fashion: $file = 'C:\path\to\some\file.doc' Note that interactively, modifying - but not adding - properties via the Properties dialog in File Explorer may be possible, if a File Explorer extension is installed for a given document type (such as for a Microsoft Word *.docx file).

broken image

Otherwise, you must use an application-specific API, such as the various COM libraries for Microsoft Office applications e.g., New-Object -ComObject Word.Application this documentation may provide further information.

broken image

Judging by this forum thread, you can only read such extended document properties in an application-independent manner via the Windows (GUI) shell, whereas updating (editing) them requires the specific application that created the file.Ī potential workaround is the 3rd-party Microsoft.WindowsAPICodePack-Shell NuGet package, though note that it hasn't been updated since 2014 see this answer for how to use it.