Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Edit extended AVI properties of media file "details" in VB.NET

39 views
Skip to first unread message

James

unread,
Mar 9, 2010, 7:21:02 AM3/9/10
to
Hi,

I am try to edit the extended file properties of media files (specifically
AVI)). Using code from
"http://stackoverflow.com/questions/220097/read-write-extended-file-properties-c"
I can successfully collect all of the properties in an avi file (35 of
them), but I have not found how I can edit the exended properties. Using the
simple the code below I would like to be able to update the "Comments" value
in the avi properties to read "Hello world" (for example) and for this change
to be written permanently to the avi.

Am I missing something very obvious?

Thanks for looking.

Code below:

Public Shared Sub getMediaProperties()
Dim arrHeaders(35)

Dim shell As New Shell32.Shell
Dim objFolder As Shell32.Folder
Dim propertyValue As String = Nothing
Dim propertyName As String = Nothing
objFolder = shell.NameSpace("C:\testmedia")

For i = 0 To 34
arrHeaders(i) = objFolder.GetDetailsOf(objFolder.Items, i)
Next
For Each strFileName In objFolder.Items
For i = 0 To 34
propertyName = arrHeaders(i)
propertyValue = objFolder.GetDetailsOf(strFileName, i)
Form1.RichTextBox1.AppendText(propertyName & ": " &
propertyValue)
If arrHeaders(i) = "Comments" Then
'--------------------------------

'--------------------------------
End If
Form1.RichTextBox1.AppendText(vbCrLf)
Next
Form1.RichTextBox1.AppendText("---------------------")
Form1.RichTextBox1.AppendText(vbCrLf)
Next

End Sub

0 new messages