4

Have now found a program for batch editing which will help me get back in control over my mountain of picture files. Its flipside is that parts of the metadata disappear in the editing. I'm not crying over lost advanced camera settings, but a couple of things I want to preserve are photo date and camera model.

To retrieve selected information was easily done with the method:

Set objShellApp = CreateObject("Shell.Application")
Set objFolder = objShellApp.Namespace(strFolder)
Set objFolderItem = objFolder.ParseName(strFile)
... followed by...
Cells(2,iColumn).Value = objFolder.getdetailsof(objFolderItem, 12) '(12 = photo taken)*<br>
Cells(3,iColumn).Value = objFolder.getdetailsof(objFolderItem, 30) '(30 = camera model)

(... etc with selected details)

In a loop through a folder the result will be a worksheet with the file names and their metadata in a table... and that's where I am now. I'm searching and I'm searching and the only thing I seem to find are different ways to retrieve the information, but what I want to know is how to put it back into a file.

Thanks in advance.
/Nick

FaneDuru
  • 38,298
  • 4
  • 19
  • 27
Runarsson
  • 41
  • 3
  • 1
    Look [here](https://superuser.com/questions/1240555/command-line-to-return-image-properties). It maybe will help you. – FaneDuru Aug 23 '20 at 18:51
  • I did check it and I'm going to revisit it when I get the time. I did find a simple tool with a GUI, but it did just give me photo date. Even though that was the most important, a little more is welcome. – Runarsson Aug 27 '20 at 08:18

1 Answers1

1

what you want to do is modify imagefile tags/properties via VBA, which is not supported. Shell32.Folder only supports reading and most of the methods are read-only for Shell32.FolderItem inside a folder object.
The only way to modify the metadata is via external tool, exiftool.
but its a commandline tool so use this post to run it from excel vba.