Import TAG - File

Hi

Posted this on Hydrogen Forum where I asked tor a tool to do tag altering based on import from a text file.
"http://www.hydrogenaudio.org/forums/index.php?showtopic=77339&st=0&gopid=676144&#entry676144"

Since my reply rgrds a Q about MP3Tag I thought I might post it here as well:
"Thnx a bunch ;o)
Although it takes quite an effort to make it work it does seem doable;
I am a bit confused about the output from the $loop(TAG) and %TAG%
$loop(%_filename_ext%) -> "Angela Hewitt - 01 - The Well-Tempered Clavier (48), collection of preludes & fugues in 2 Books, BWV 846-893 (BC L80-127)" (without the quotes)
%_filename_ext% -> Book 1. No. 1 in C major. Prelude.flac

The full filename reads:
Angela Hewitt - 01 - The Well-Tempered Clavier (48), collection of preludes & fugues in 2 Books, BWV 846-893 (BC L80-127); Book 1. No. 1 in C major. Prelude.flac
..
To me it seems as if the $loop(%_filename_ext%)%_filename_ext% in conjunction gives the full file name, but according to the help on MP3Tag it should be the filename including extension ... a bit confused???

Also if I have understood the text right I can compile a file containing alle the tags I want to change together with the full path + filename as reference and do the import from MP3Tag with Text File - > Tag (Alt - 4) ...and use the %taq%;%tag% ... as the template for the import ...right?
If that is true I guess the right way of doing the edit will be create the template ... do an export based on that ... change the stuff I want to change and then import the changes ... comments?

/Cheers Søren
"

Hmm, I do not understand quite well what you want to tell us and what is your particular problem.

Please create an export script ...

$filename(20091030.Test.sorenb.txt,ANSI)
'Loop 1'
$loop(%_filename_ext%)
'%_filename_ext%:' %_filename_ext%
$loopend()

'Loop 2'
$loop(%_filename%)
'%_filename%:' %_filename%
$loopend()

... and run it against a small selection of tracks.
Read the output text file carefully, what do you see?
Show us your example output text content.

DD.20091230.1029.CET

Please create an export script ...

$filename(20091030.Test.sorenb.txt,ANSI)
'Loop 1'
$loop(%_filename_ext%)
'%_filename_ext%:' %_filename_ext%
$loopend()

'Loop 2'
$loop(%_filename%)
'%_filename%:' %_filename%
$loopend()

I ran the script against a small selection of tracks.
Ok...My problem stem from the import due to the ';' used in the filename thus it became divided into two in Excel!
When looking at the output from your scripts it seemed perfectly ok.
Then I try to use my script in conjuntion with yours calling it 'loop3'....and it came out ok.
Then I turned to the ANSI option you are using tor the text output and altered it to the "utf-16", still ok. Then it hit me that Excel might be the problem ... as it turned out the problem was 40cm in front of the screen, me, forgetting the ',' in the filename itself.
Thnx a bunch for helping anyway ;o)

/Cheers Søren

Ok, good way gone to sort it out.

BTW ...
Your filenames are rather long, this might get into problems when you are having long foldernames too. The Windows MAXPATH length is 260 chars, including "\\<SHARE>" resp. ":" prefixes.

Did you ever stored such wide named files into a folder tree on CD?

To avoid such long self explaining filenames there was made an invention called "Tagging".
You can use Mp3tag to store all special informations into distinct tag fields and keep the filename short and concise.

DD.20091230.1742.CET