IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> [X] Export: one file per directory no longer works
jerry1970
post Mar 16 2015, 21:56
Post #1


Member


Group: Full Members
Posts: 18
Joined: 10-October 09
Member No.: 11071
Mp3tag Version: 2.44



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.
Go to the top of the page
 
+Quote Post
ohrenkino
post Mar 17 2015, 19:19
Post #2


Member


Group: Full Members
Posts: 8317
Joined: 9-December 09
From: Norddeutschland / Northern Germany
Member No.: 11458
Mp3tag Version: 2.81b



ZITAT(jerry1970 @ Mar 16 2015, 21:56) *
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.


--------------------
42 - wie war die Frage / what was the question / quelle était la question
Go to the top of the page
 
+Quote Post
DetlevD
post Mar 17 2015, 21:57
Post #3


Member


Group: Full Members
Posts: 6424
Joined: 26-May 06
From: Wuppertal, Germany, Planet Earth
Member No.: 3194
Mp3tag Version: 2.81b



QUOTE (jerry1970 @ Mar 16 2015, 21:56) *
Just upgraded to v2.69 and it appers the 'one file per directory' export no longer works. ...

Yes, the preview window shows immediately the new bug.

DD.20150317.2157.CET


--------------------
* Beyond that, don't ask, when you don't know what to do with the answer. *
♥ home is where the heart is ♥
Go to the top of the page
 
+Quote Post
jerry1970
post Mar 19 2015, 22:05
Post #4


Member


Group: Full Members
Posts: 18
Joined: 10-October 09
Member No.: 11071
Mp3tag Version: 2.44



QUOTE (ohrenkino @ Mar 17 2015, 19:19) *
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.


Thanks, this did the trick!
Go to the top of the page
 
+Quote Post
Florian
post Mar 20 2015, 07:40
Post #5


Developer


Group: Admin
Posts: 8058
Joined: 12-December 01
From: Germany, Dresden
Member No.: 203
Mp3tag Version: 2.81b



QUOTE (DetlevD @ Mar 17 2015, 21:57) *
Yes, the preview window shows immediately the new bug.

DD.20150317.2157.CET

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

Kind regards
Florian


--------------------
♫ If you like using Mp3tag please donate to support further development.

Go to the top of the page
 
+Quote Post
DetlevD
post Mar 20 2015, 08:42
Post #6


Member


Group: Full Members
Posts: 6424
Joined: 26-May 06
From: Wuppertal, Germany, Planet Earth
Member No.: 3194
Mp3tag Version: 2.81b



QUOTE (Florian @ Mar 20 2015, 07:40) *
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


--------------------
* Beyond that, don't ask, when you don't know what to do with the answer. *
♥ home is where the heart is ♥
Go to the top of the page
 
+Quote Post
Florian
post Mar 20 2015, 09:06
Post #7


Developer


Group: Admin
Posts: 8058
Joined: 12-December 01
From: Germany, Dresden
Member No.: 203
Mp3tag Version: 2.81b



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


--------------------
♫ If you like using Mp3tag please donate to support further development.

Go to the top of the page
 
+Quote Post
DetlevD
post Mar 20 2015, 09:52
Post #8


Member


Group: Full Members
Posts: 6424
Joined: 26-May 06
From: Wuppertal, Germany, Planet Earth
Member No.: 3194
Mp3tag Version: 2.81b



QUOTE (Florian @ Mar 20 2015, 09:06) *
... 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. ...

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.

QUOTE
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.

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


--------------------
* Beyond that, don't ask, when you don't know what to do with the answer. *
♥ home is where the heart is ♥
Go to the top of the page
 
+Quote Post
Florian
post Mar 20 2015, 09:58
Post #9


Developer


Group: Admin
Posts: 8058
Joined: 12-December 01
From: Germany, Dresden
Member No.: 203
Mp3tag Version: 2.81b



QUOTE (DetlevD @ Mar 20 2015, 09:52) *
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.

Then you have to use a filename pattern that matches your directory structure, e.g.,
%artist%\%album%\mp3tag.html


--------------------
♫ If you like using Mp3tag please donate to support further development.

Go to the top of the page
 
+Quote Post
DetlevD
post Mar 20 2015, 10:08
Post #10


Member


Group: Full Members
Posts: 6424
Joined: 26-May 06
From: Wuppertal, Germany, Planet Earth
Member No.: 3194
Mp3tag Version: 2.81b



QUOTE (Florian @ Mar 20 2015, 09:58) *
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

This post has been edited by DetlevD: Mar 20 2015, 10:20


--------------------
* Beyond that, don't ask, when you don't know what to do with the answer. *
♥ home is where the heart is ♥
Go to the top of the page
 
+Quote Post
Florian
post Mar 20 2015, 10:15
Post #11


Developer


Group: Admin
Posts: 8058
Joined: 12-December 01
From: Germany, Dresden
Member No.: 203
Mp3tag Version: 2.81b



QUOTE (DetlevD @ Mar 20 2015, 10:08) *
Yes ... something like this ...
$filename(%_folderpath%'TEST.FN.COUNT.TXT',ANSI)

Yes, using %_folderpath% here is quite smart smile.gif

Have a nice day!


--------------------
♫ If you like using Mp3tag please donate to support further development.

Go to the top of the page
 
+Quote Post
MasterKaster
post May 2 2016, 08:33
Post #12


Member


Group: Full Members
Posts: 25
Joined: 8-June 13
Member No.: 18023
Mp3tag Version: 2.77



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!
Go to the top of the page
 
+Quote Post
thaiskylab
post Dec 27 2016, 04:49
Post #13


Member


Group: Full Members
Posts: 6
Joined: 31-March 09
Member No.: 9421
Mp3tag Version: 2.42



$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.
Go to the top of the page
 
+Quote Post
poster
post Dec 27 2016, 08:41
Post #14


Member


Group: Full Members
Posts: 1292
Joined: 22-March 09
Member No.: 9241
Mp3tag Version: 2.81b



$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

This post has been edited by poster: Dec 27 2016, 08:42
Go to the top of the page
 
+Quote Post
thaiskylab
post Dec 27 2016, 14:10
Post #15


Member


Group: Full Members
Posts: 6
Joined: 31-March 09
Member No.: 9421
Mp3tag Version: 2.42



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 post has been edited by thaiskylab: Dec 28 2016, 02:28
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 30th March 2017 - 11:46