ExifTool Forum

ExifTool => Archives => Topic started by: Archive on May 12, 2010, 08:54:30 AM

Title: read or write tags between dissimilar files within folders
Post by: Archive on May 12, 2010, 08:54:30 AM
[Originally posted by ryerman on 2009-02-09 06:28:30-08]

Hi Phil,

I have a digital music collection: folders that each contain one album. Each folder contains mp3 files (the songs) and jpg files (the album art).  Can we use some of the the mp3 tag values to tag the jpg files, within each folder?  Each mp3 file has  ID3v2.3 tags created with "Mp3tag" by Florian Heidenreich.

I'm under the assumption that Exiftool cannot copy mp3 tags but maybe specific mp3 tags can be written to a file that we can access to write tags to jpg files, in the folder.  If that's possible, would you please provide examples of how it might be done?

  To create some file(s) I used this command:
                  "C:\Program Files\Exiftool\exiftool.exe" -k -ext mp3 -T -year -band -w txt    

How do we access those files?  How do we use the particular tags in those files?

Thank-you for your program and your expertise.

Jim
Title: Re: read or write tags between dissimilar files within folders
Post by: Archive on May 12, 2010, 08:54:30 AM
[Originally posted by exiftool on 2009-02-09 11:22:25-08]

Hi Jim,

ExifTool can not write MP3 files, but it can be used to
copy MP3 tags to JPEG images.  If the MP3 files have the
same names as the JPEG images, it can be done like this
in batch mode:

Code:
exiftool -tagsfromfile %d/%f.mp3 "-comment<$TAG1 $TAG2 some text if you want $TAG3" -ext jpg DIR

This example copies a bunch of tags to the JPEG comment, but
you can copy tags to wherever you want.  Note that you should
use single quotes in Unix or on the Mac.

See the COPYING
EXAMPLES
section of the application documentation for
more examples of how to copy files.

Have fun.

- Phil
Title: Re: read or write tags between dissimilar files within folders
Post by: Archive on May 12, 2010, 08:54:30 AM
[Originally posted by ryerman on 2009-02-11 06:42:52-08]

Hi Phil,

Thank-you for your quick response.  I will review the copying examples.

Unfortunately, none of the MP3 files has the same name as any of the JPEG images.  The names of the MP3 files are the various song titles while the name of the JPEG image is the album title.  Is there some way to copy between files with different names?
  In case there is not, I will study the documentation to try and find a way to rename and/or create a temporary MP3 file with a name that matches the JPEG file.  I hope it is possible.

My original thought was to create a table of tag values from the MP3 files (one row per MP3 file).. Each row in the table would be identical.   Any row could be used (hopefully) to write the tag values to the JPEG images.  That's easy to say, but is it even possible?

As you implied, batch mode is required.

In Summary:

1.  Can we copy between files with different names?

2.  Can we create a temporary, readable table from files within a folder?

3.  Can we write information from a table to a file(s) within a folder?

By the way;  Bravo! for ExifTool and your support.

Jim
Title: Re: read or write tags between dissimilar files within folders
Post by: Archive on May 12, 2010, 08:54:30 AM
[Originally posted by exiftool on 2009-02-11 13:48:00-08]

Hi Jim,

You can specify different filenames for the source tags
(give a specific file for the -tagsFromFile option),
but of course if you do so you need to execute a different
command for each different filename.  Sometimes it is
easier to use a text editor to create a batch file from
a list of the filenames if you can do this.

So you are answers are:

1) Yes

2) ExifTool doesn't read tabular-format data, but you could
do this with an XML output file.

3) Same answer as 2.

- Phil