I always download some music which without track number in the tag, and the files have no track number before the file name. it's just like "AAAAA", not "01 AAAAA".
So, I want to import the tracklist to file name,
e.g.
I have files:
AFFF
BEEE
CDDD
DCCC
EBBB
FAAA
and i get the track list with track number:
1 CDDD
2 EBBB
3 AFFF
4 FAAA
5 DCCC
6 BEEE
How can I import the track list to file name with MP3tag?
And make sure the tracks will match with the name and number.
I don't want to add track number one by one, coz some of the albums have a lot of tracks.
At first your question looks as if it is easy to solve with the converter "Textfile - Tag".
But because the list file of "Track Filename" entries probably does not contain the filename as an absolute path name, then the converter "Textfile - Tag" can not afford the appropriate allocation between the current file and its related track number.
With the following action group, the problem is quickly finished.
In Action #1 adapt the filepath location of the input text file to your needs.
Begin Action Group Test_2013#MatchFilenameInListfile.GiveTrack
Action #1 Actiontype 14: Import text file Field __: TMP_LIST Filename: 'T:\TEST\Tracklist.txt'
Action #2 Actiontype 5: Format value Field ______: TMP_LIST Formatstring: $regexp($char(13)$char(10)%TMP_LIST%$char(13)$char(10),'\s*[\r\n]+\s*','\r\n')
Action #3 Actiontype 5: Format value Field ______: TMP_FN Formatstring: $regexp(%_filename%,'[\*+?|{}[]()^$.#\ ]','\\$0')
Action #4 Actiontype 5: Format value Field ______: TRACK Formatstring: $regexp(%TMP_LIST%,'^.\n(\d+)\s+('%TMP_FN%')\r.$','$1')
Action #5 Actiontype 5: Format value Field ______: TRACK Formatstring: $if($eql(%TRACK%,%TMP_LIST%),'0',%TRACK%)
If there're some special letters in the tracklist, such as "(", ")" etc...
There will be a problem of this action.
The track number will show all the track list.
But it seems still have problem. When the file names don't match, the track numbers will be wrong. It just show "0".
Or maybe we can do it in this way:
Just replace the filename and the title IF the words matches, no matter it's uppercase or lowercase. Then add the track number in the track tag. Since the names have all matched, it will be easy to get the track numbers.
Hm, I do not understand ... does it mean, that "MatchFilenameInListfileCaseInsensitive" does not work?
If the number '0' is irritating, you may replace the number '0' with the space character or leave the TRACK field just empty.
I think it doesnt work. If the file name in the tracklist doesn't match with the file name I have in my computer, when I do the action group, the track number will be written an "0".
The others which names matched will be OK.
Hm, yes, you have described exactly the principle of matching.
Therefore the TRACK '0' can be a mark for you to check the spelling of the related filename.
I found it's just like earlier, when there're some special letters like: (, ), $, @ and letters from some other languages (French, germany and etc), the track numbers will show empty. Even the names match.
I mentioned the "0", because I added "tag - filename" to the end of this action, that's why it shows "0", the real reason is the track number tag is empty.
Please give some more examples of your mystery names.
The already escaped characters "$()" should work in the given regular expression.
The symbol @ should also make no harm.
The comma might hurt, so put it in the list of escaped characters too: