Metatags - how to modify/update? (GetDetailsOf )

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15619
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Metatags - how to modify/update? (GetDetailsOf )

Post by ChrisGreaves »

I have found sample code (attached) to obtain MetaData from any file (that contains MetaData). Not to be confused with MSOffice Document Properties, Built-in or Custom.

I am particularly interested in audio and graphic files – typically MP3 and JPEG formats, but also in investigating files with other extents that might be audio or graphic files.

I am conscious too that the MetaData content of files puts me at the mercy of whichever programmer decided on which fields are which, a range which extends from Current Affairs podcasters in Australia, the UK and Canada right through to the person who uploads file descriptions to the AudioGrabber database.

The accompanying code demonstrates how one can obtain an array of one hundred elements of Metadata.
GetDetailsOf.png
I have been unable to unearth code to put/set details of MetaData.
My Shift-F2 snapshot of the library shows the GetDetailsOf method but no corresponding transfer back to the file.

Too, I am puzzled that one cannot write details back to the file. As noted above I see that it could pose problems, but then, I can cause problems in many other ways, and am not restricted to doing so with injudicious MetaData values. The Visual Basic for Applications KILL statement comes to mind ...

As usual, any tips or tricks will be gratefully mulled over late at night or early in the morning.

https://access-programmers.co.uk/forums ... p?t=265850" onclick="window.open(this.href);return false; I think this is the original source of my code.
You do not have the required permissions to view the files attached to this post.
There's nothing heavier than an empty water bottle

User avatar
HansV
Administrator
Posts: 78481
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Metatags - how to modify/update? (GetDetailsOf )

Post by HansV »

ExifTool by Phil Harvey has a command-line interface for reading, writing and editing file metadata.
Best wishes,
Hans

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15619
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Metatags - how to modify/update? (GetDetailsOf )

Post by ChrisGreaves »

HansV wrote:ExifTool by Phil Harvey has a command-line interface for reading, writing and editing file metadata.
Thanks Hans. I have d/l the Win executable and several pages. I'll play with it this weekend.
(Also will dig out my VBA code to execute a command line from VBA ..... (grin))

Cheers
Chris
There's nothing heavier than an empty water bottle

Kenneth Hobson
NewLounger
Posts: 3
Joined: 18 Oct 2017, 00:14

Re: Metatags - how to modify/update? (GetDetailsOf )

Post by Kenneth Hobson »

GetDetailsOf works fine for reading property values. To write, you need a 3rd party application. DSOfile.dll is limited but allows some property field updates. http://www.cpearson.com/excel/docprop.aspx" onclick="window.open(this.href);return false;

User avatar
HansV
Administrator
Posts: 78481
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Metatags - how to modify/update? (GetDetailsOf )

Post by HansV »

Welcome to Eileen's Lounge, and thanks for your link. DSOFile.dll is useful for Office documents, but using it with recent versions of Office may be problematic.
Best wishes,
Hans

Kenneth Hobson
NewLounger
Posts: 3
Joined: 18 Oct 2017, 00:14

Re: Metatags - how to modify/update? (GetDetailsOf )

Post by Kenneth Hobson »

Right, there are 64bit versions of dsofille.dll but some of those don't even do all that the 32bit did more reliably. The main benefit was for Microsoft applications though it did have use for some other file types to a limited degree.

One can use .Net for but even that is more involved and likely not the answer here.

For the 3rd party shell method, Shell() can be used but it would likely be best to use a Shell and Wait method. This gives it time to do its thing. Here are two methods.
1. http://www.cpearson.com/Excel/ShellAndWait.aspx" onclick="window.open(this.href);return false;
2. http://www.mvps.org/access/api/api0004.htm" onclick="window.open(this.href);return false;

Both use 32bit versions of API command(s).

JKP documents many of the 64bit API's and shows how to code it for either. http://www.jkp-ads.com/articles/apideclarations.asp" onclick="window.open(this.href);return false;

Though for Office 2010 32bit vs. 64bit API's, there is good documentation here. https://support.microsoft.com/en-us/hel ... it-support" onclick="window.open(this.href);return false;

User avatar
HansV
Administrator
Posts: 78481
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Metatags - how to modify/update? (GetDetailsOf )

Post by HansV »

Thanks again!
Best wishes,
Hans

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15619
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Metatags - how to modify/update? (GetDetailsOf )

Post by ChrisGreaves »

Kenneth Hobson wrote:GetDetailsOf works fine for reading property values. To write, you need a 3rd party application. DSOfile.dll is limited but allows some property field updates. http://www.cpearson.com/excel/docprop.aspx" onclick="window.open(this.href);return false;
Kenneth, hello, and thank you for the link.
I deal with document properties within my VBA code, but now I am looking to [understand and] edit metadata of the sort associated with audio files, image files, and then files in general.
I have spent a few days digesting data from http://www.ID3.org" onclick="window.open(this.href);return false; - and what an interesting read it is.

I reached the stage this morning where I can assemble metadata values in a string array. Writing the GUI form editor is no problem. This evening I aim to write metadata back to the file.

Time permitting, I'll be posting some sample code here in Eileen's Lounge.

Cheers
Chris
There's nothing heavier than an empty water bottle

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15619
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Metatags - how to modify/update? (GetDetailsOf )

Post by ChrisGreaves »

HansV wrote:ExifTool by Phil Harvey has a command-line interface for reading, writing and editing file metadata.
Hans, I d/l this and checked it out, even worked through two examples until i discovered that ExifTool doesn't update MP3 files.
I have problems understanding this.
I get that metadata formats are different for each type of file, and I mean formats, not tag-names.
I don't get the reluctance to allow a utility to update the tags.

I will complete my little VBA updater, but already i have a feeling that even with the metadata fields all brought up to date in my 15,000 audio files, I will still want to transfer that metadata to an MDB database, to drive a playlist generator and MP3 player, and so, why not just load it into the MDB in the first place?

(signed) 'Running around in circles again" of Toronto.
There's nothing heavier than an empty water bottle

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15619
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Metatags - how to modify/update? (GetDetailsOf )

Post by ChrisGreaves »

Kenneth Hobson wrote:One can use .Net for but even that is more involved and likely not the answer here.
FWIW through the ID3.org I examined mailing list topics and a variety of vb.net and ActiveX sites to see if any crumbs of VB had fallen from the table.
All activity seems to have died after about 2012. Web pages don't exist, latest posting is 2012, ...

It's as if everybody suddenly gave up and went home!

Cheers
Chris
There's nothing heavier than an empty water bottle