You can import tags form a text file either ...
from a text file where the sequence and number of the records in the text file matches that of the selected files
from a text file where there is one field per record that represents the filename - MP3tag would then take the rest of the data from that record to assign it to the tags in the named file.
If you want to use this convert function, then you have to supply a list of fields which should be imported, separated by the correct separator.
E.g. this record structure
|19604625 |Shadows |Man Of Mystery |3 |13/11/1960 |25 | |
could be imported with such a mask:
|%my_id% |%title% |%artist% |%track% |%mydate%|%dummy% |%dummy%
if the number 19604625 is actually the filename, you would have to add .mp3 in the data source, so that the record becomes:
|19604625.mp3 |Shadows |Man Of Mystery |3 |13/11/1960 |25 | |
and the mask could modified to:
|%_filename% |%title% |%artist% |%track% |%my_date%|%dummy% |%dummy%
1: the number and sequence of files matches exactly the number and sequence of records in the text file. One record is represented by one line of text, terminated by the paragraph termination characters carriage return and line feed.
2: a record contains one piece of data that represents the filename. Then the data of that record is assigned to the tags in the file according to the rest of the mask.
The number and sequence does not necessarily have to match each other.
So you have to decide which of the 2 modes you want to use.
If you can, use mode 2 as this leads to the fewest surprises. You would have to find a way to get the field for the filename (with extension), though.
For the import in mode 2, select all files, even if they do not have a matching record or even if there are more records in the text file than there are files. This should work... as long as matches are found.
This is very powerful and useful - however I am having problems getting it to work in mode 2.
I have tried more entries in the file than selected MP3Tag files and the other way around but it always seems to work in mode 1.
It would be really nice if you could select which mode you wanted it use - regardless of the number of selected records and the number of file entries.
Thanks for the prompt reply.
I am pretty sure I tried %_filename% in several scenarios - but I will have another go.
Ideally if you want and could select mode 2 and no matches occur (for whatever reason) it would not do anything - at the moment, as I understand it, if no matches occur it will switch to mode 1 and potentially mess up your (mp3tag) files with all the wrong information.
No, you would get an error message that the lines could not be parsed - simply because the fiield %_filename% is included in the mask but not in the data.
Or you have the field %_filename% but you have not mentioned it in the mask - so the records and the import instruction do not match.
After a bit of investigation I have found that a small typo in ohrenkino's script and instructions has been causing the problem.
Rather than using %_filename% it should have been %_filename_ext%.
This now works perfectly in my tests and only uses mode 2 and reports any matches it did not find.
It also does not switch to mode 1 if it finds no matches at all
So if Silver Surfer is still listening here is a modified version of the script that should work for you.
Yes, you mentioned in a previous post that the actual file name may have up to three different letters at the end.
The problem here is that %_filename_ext% has to be used to get mode 2 (the search mode) to work and it has to match the file name in the text file.
I believe you have already added .mp3 to make up the file names in the text file so a quick solution would be to change it (using a text editor) to c.mp3 this will add the C to the end of all the file names in the text file.
For example: 19602232.mp3 becomes 19602232C.mp3 in the text file.
Then run the MP3Tag convert function - this should process all the files with a final C and, importantly, ignore the rest.
Then (using a text editor again) change all the c.mp3's to (say) a.mp3 in the text file, then run the MP3Tag convert function again to process all the matching files that have a A at the end and so on.
It is bit of a clunky solution but should work.
Note: I have assumed that the numbers in the files are unique regardless of final letter.