If one looks at file properties in Windows Explorer, the "Details" tab, - for many filetypes (for example, tiff or jpeg images, Office documents, etc.) there is the "Description" section with fields like "Title", "Subject", "Tags", and "Comments". Is there a way to read/write these fields from Perl or a PowerShell script?
How do I access "Details" ("Title", "Subject", etc.) of file properties in Perl or PowerShell script
Asked
Active
Viewed 2.0k times
7
-
2Look here: http://gallery.technet.microsoft.com/scriptcenter/c3d0ea6c-64a1-4716-a262-bcd71c9925fc – CB. Sep 28 '12 at 21:23
2 Answers
4
I wrote up a blog post on how to access extended properties a while back - as in when PowerShell was still in beta and called Microsoft Command Shell (MSH). :-) I think it's still a valid approach.

Keith Hill
- 194,368
- 42
- 353
- 369
-
Keith, thanks for so fast response! For the moment I did not succeeded to apply your code to modern PowerShell, I will try to dig in more :) – Vasily A Sep 28 '12 at 21:17
-
4This blog post from Tobias is more up-to-date: http://powershell.com/cs/blogs/tobias/archive/2011/01/07/organizing-videos-and-music.aspx – Keith Hill Sep 28 '12 at 21:31
-
1Great! that example works perfectly at least to get the values, so all I needed was the .GetDetailsOf function. And what if I would like also to change values in the file - is there any way to do that? If I understand correctly, in that example fields are just copied from the file to NoteProperty members and will not be saved in the file, right? – Vasily A Sep 28 '12 at 23:33
-
is there still not a one-liner powershell/cmd statement that will allow me to access the extended attributes of a given file type? what i will be doing is spawning an instance of powershell from a nodejs script sooo – oldboy Jan 22 '20 at 06:57
0
PowerShell has gone through some iterations, and this can now be achieved with a native command: Get-ItemProperty
Example: Shows the current details of ntdll.dll file:
Get-ItemProperty C:\Windows\System32\ntdll.dll | format-list

Peter Mortensen
- 30,738
- 21
- 105
- 131

anonymous coward
- 172
- 2
-
1this does not provide the extended attributes for certain file types :( how do i get the extended attributes? – oldboy Jan 22 '20 at 06:55