• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Using metadata from avi files in VBA [SOLVED]

Hi the forum,

I have many "AVI" family files with metadata specifying the location, date, ...

Is it possible in Excel VBA

- Either to read the metadata directly from the hard drive and use them for selection;

- Either to extract them to feed an Excel spreadsheet.

Thanks in advance for any ideas or solutions.

Harry
 
Try to find a cli utility that will extract the metadata from an avi file- ideally to a .csv file. Sourceforge may be a good place to start. If you can do that, I _think_ you can get coax vba to open the text file and get all the data.
 
Hi !


"Surely doable" but it depends on the data to extract and maybe the OS version …


For example, see http://technet.microsoft.com/library/ee176615.aspx …
 
Hi dam_l

Thanks for your answer.

I found TigoTago tp retrieve the metadata but this soft doesn't export them. A very interesting function allows any change on some metadata.

I start a new thread to automatize the changes with VBA


Hi Marc L.

Thanks for your advice.

I change a little bit the example from the hyperlink. Hereinafter, the modified code; it may perhaps help some other people.


All is working perfectly.

Harry


Option Explicit

[pre]
Code:
Sub Mod_Avi()
Dim arrHeaders(300)
Dim i As Integer, a As Integer
Dim strFileName As Object
Dim objShell   As Object
Dim objFolder  As Object
Set objShell = CreateObject("Shell.Application")
'Set objShell = New Shell
a = 2
Set objFolder = objShell.Namespace("I:")
For i = 0 To 299
arrHeaders(i) = objFolder.GetDetailsOf(objFolder.Items, i)
Next
For i = 0 To 299
Worksheets("Sheet1").Cells(1, i + 1).Value = arrHeaders(i)
Next
For Each strFileName In objFolder.Items
For i = 0 To 299
Worksheets("Sheet1").Cells(a, i + 1).Value = objFolder.GetDetailsOf(strFileName, i)
Next
a = a + 1
Next
End Sub
[/pre]
 
Back
Top