[X] Export: one file per directory no longer works

Just upgraded to v2.69 and it appers the 'one file per directory' export no longer works.
In the previous version I could go into the root folder of a drive, select several sub folders, then open MP3Tag, select all files there and Ctrl-E for Export. The 'one file per directory' used to write an export file in every directory I opened in MP3Tag, but now ('one file per directory' checked or unchecked) leaves me a single file in the root.

There is a conflict between the setting you might have in the export script and that what you use as filename in the export dialogue.
If you want to get a file per folder you should use a filename description with a variable (or even more) that creates different filenames.
So if you start from a root folder, you would have to specify a filename that uses the the variable %_folderpath% plus \ in front of the filename, e.g.
%_folderpath%\export.csv

This can be entered in the dialogue as well as in the script.

Yes, the preview window shows immediately the new bug.

DD.20150317.2157.CET

Thanks, this did the trick!

I've also checked it by myself and cannot identify any issue. Can you be more specific here?

Kind regards
Florian

For once I will reply in German language.

Hallo Florian, ...
ich nehme nicht in Anspruch, Mp3tag wirklich zu verstehen ;-), ...
deshalb kann es sein, ...
dass ich vielleicht einen falschen Schluss gezogen habe, aus dem was ich gesehen habe.

Mit Option gesetzt für "Eine Datei pro Verzeichnis" ...
ist das folgende Export Skript gelaufen ...
gegen einen Ordnerbaum ...
$filename('TEST.FN.COUNT.TXT',ANSI) $loop(%_folderpath%) $loop($regexp(%_filename%,'(\d)+$',)) 'Path #'%_counter% %_directory%'\'%_filename% $regexp(%_filename%,'(\d)+$',) $loopend()$loopend()


... unter der Annahme, ...
dass der relative Dateiname "TEST.FN.COUNT.TXT" dafür geeignet ist, ...
in jedem beteiligten Ordner eine Ausgabedatei zu erzeugen.

Im Statusfenster erschien der Bericht ...
Es wurden Informationen aus 1 Dateien verarbeitet und in die Datei "M:\MUSIK\ROCK\Y\TEST.FN.COUNT.TXT" exportiert.
Es wurden Informationen aus 10 Dateien verarbeitet und in die Datei "M:\MUSIK\ROCK\Y\TEST.FN.COUNT.TXT" exportiert.
... usw. ...
Es wurden Informationen aus 4 Dateien verarbeitet und in die Datei "M:\MUSIK\ROCK\Y\TEST.FN.COUNT.TXT" exportiert.
Es wurden Informationen aus 13 Dateien verarbeitet und in die Datei "M:\MUSIK\ROCK\Y\TEST.FN.COUNT.TXT" exportiert.

Es ist zu erkennen, dass die auf Ordner bezogene Verarbeitung stattgefunden hat, ...
aber für die Ausgabe wurde immer derselbe Dateipfadname benutzt.

Am Ende gabe es dann nur eine Datei ...
"M:\MUSIK\ROCK\Y\TEST.FN.COUNT.TXT"
... mit dem Inhalt des letzten verarbeiteten Ordners.

DD.20150320.0842.CET

Thanks Detlev, for the explanation.

Basically, — as pointed out by ohrenkino in post #2 — to create one file per directory, the format of the filename must contain some kind of placeholder (e.g., %_directory% or %artist%-%album%) so that for each of the directories also one new filename is generated.

I'm marking this topic as [X] No bug.

Kind regards
Florian

Hmm, ... this method of forced using a Mp3tag placeholder, ...
which should not be needed to define a proper filename, ...
does not help on the error message from the open poster.

Even when using a Mp3tag placeholder within the export script's filename, ...
the newly created output files will not be written into the different destination folders, ...
but all together into their common parent folder.

DD.20150320.0952.CET

Then you have to use a filename pattern that matches your directory structure, e.g.,

%artist%\\%album%\mp3tag.html

Yes ... something like this ...
$filename(%_folderpath%'TEST.FN.COUNT.TXT',ANSI)
$puts(Note,'Set Mp3tag Export option "One file per directory" to "yes"')
$loop(%_folderpath%)$loop(%_filename%)
'Path #'%_counter% %_directory%''%_filename%
$loopend()$loopend()

Is it possible to have the option "yes/no" for "One file per directory" ...
set within the export script in the $filename declaration?

DD.20150320.1020.CET

Yes, using %_folderpath% here is quite smart :slight_smile:

Have a nice day!

It's weird that we have to specify $filename(%_folderpath%'filename.txt', utf-8)
To create a new file in every folder. Even though One file per directory is checked!

$loop(%track%)%track%-%artist% - %title%
$loopend()

this is what I am using. where do I add the directory info %_directory%\ to make the files go into separate folders as before. All the ways I have tried i get one long list in the root folder.

One answer earlier said add to script & dialogue. Where is dialogue?

thanks in advance.

$filename should be in the first line of your export-script:
e.g. $filename(%_folderpath%'filename')

The dialog appears when you envoke an export (File->Export or CTRL+E.)
You are asked for the filename:
%_folderpath%filename

Thank you.

To help others I went from

$loop(%track%)%track%-%artist% - %title%
$loopend()

To

$filename(%_folderpath%/'list.txt')$loop(%track%)%track%-%artist% - %title%
$loopend()

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.