attributes - Powershell - how to set "title" in extended file properties -


i'm trying write tagging system in powershell. able set 'tag' of choice in file example using 'title' field don't use it. files i'd tag mixture of photos/videos , text.

i've found quite easy read/get extended file attributes there multiple examples available on net, i'm finding extremely difficult find examples of modifying or writing extended file properties; in powershell.

i have managed write 'titles' files using taglib-sharp seems have problems various photos , there not info available troubleshooting. plus deals audio/video/photo files.

this code have read title (from test photo):

$path = 'c:\temp\photo.jpg' $shell = new-object -comobject shell.application $folder = split-path $path $file = split-path $path -leaf $shellfolder = $shell.namespace($folder) $shellfile = $shellfolder.parsename($file) $shellfolder.getdetailsof($shellfile, 21) 

can tell me how can update attribute , write/save file?

these depend on file formats. windows explorer able show these extended file properties because plugins let know how information. not file formats support this. example simple txt files don't have title. know of no single api set extended file properties, need find a library each file format want support. example taglib-sharp photos, videos , audio , itextsharp pdf. wan't able set title formats, since don't support it.

you better way tag files. maybe ntfs alternate data streams might you.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -