Import song year from text file


#1

I have many song files from 60's and 70's. I have a separate list of top hits from 60's - 90's ..with the year song was released..would like to update the YEAR tag in the collection, by looking up values in a second text file...

Assuming that all my song files are in same folder, is there a way for the MP3Tag sw to grab a song file, compare that to the list of song names, then add the year value into the %year% field ?

This assumes a strictly unique match between the titles in both files...was thinking you cld use TEXT - TAG feature (?)

Would sure beat entering by hand !


#2

If you want to get data from a text file into tags, you have these alternatives:

  • the order of the data in the text file and the order of the target files match.
  • the text has data that represents the filename in each record. the data and the files are then aligned by filename.

I do not know which option is easier for you.
e.g. you could rename the files so that the filename is equal to the title in the text file so that you could use the second method.


#3

Thanks - so, to be clear - there should be a 1-1 correspondence between each line between the files ..so if there are 512 files in the folder, there should be 512 lines in the text file ... I think the filename approach is doable..

I cld temporarily rename the files to just the title

I can try this on a small collection ... will be a big time saver once everything lines up ...

Measure twice,, cut once...

THX


#4

So a record in the text file should look e.g. like this:
"yesterday.mp3";"1965"
and when you use Convert>Text file-Tag
Format string: "%_filename_ext%";"%year%


#5

Just ran a "test export to a csv - 3 fields... did the text - tag and bingo --\

records in csv outputted as Title;Artist;Year

Used format string of %Title%;%Artist%;%Year

All the files will be coming from the same directory - should I use the filename_ext field ?

this will take some prep, but will be a big time saver, and worth the effort...


#6

The filename is the only criteria to align data and files.
If this is not necessary and the order of the data in the text file matches that of the audio files, then you can leave out that extra preparation step.
If you have doubts or there are fewer files than records, I do not see an alternative.


#7

Just finished creating a csv with title,artist, year....I wound up using the vlookup function in excel to get the years matched to the right title ...

Going to backup folder, then try the import using the text file ...


#8

So import works - still need to clean a few things up ..the technique is a big time saver for the number of files I have ..

I was thinking of using the auto-increment track number in the export file so I can easily match up records ...

would use format Used format string of %Track%,%Title%,%Artist%,%Year


#9

Please note that a plain comma might mess up things as commas also appear in artists' names (Earth, Wind & Fire) or titles (Pigs, three different ones).


#10

Thanks - What delimiter char should I use when I do the export ? should I stick with the semi colon ? not too many titles with that, I guess ...


#11

If you treat the data in Excel or something like that after the export then I would suggest $char(9) (the tab character)
So it is
%Track%$char(9)%Title%$char(9)%Artist%$char(9)%Year%

For the import I would suggest that you enclose at all the fields that can contain real text (and not just numbers) in "
So something like:
%Track%,"%Title%","%Artist%",%Year%
The data wold have to reflect that, so a record would look like
01,"Ellis, Beggs & Howard","Big Bubbles, No Troubles",1988