I've stuffed up

I edited an existing .mte file which I had downloaded (can't find which one!)

$filename(Folder Album List.txt)Folder Album name list
$loop(%_folderpath%)
$if($eql($folderdepth(%_folderpath%),$folderdepth(%_workingpath%)),,%artist% - %album% $if(%year%,'['%year%']',))$loop(%_directory%)$loopend()$loopend()$loop(%_filename_ext%)$if($eql($folderdepth(%_folderpath%),$folderdepth(%_workingpath%)),
%artist% - %album% $if(%year%,'['%year%']',),)$loopend()

When I use it to export all I get is the Album name.

Can someone please put me right?
Thanks
Genevieve
:astonished:

You have to know what you want to do and you have to know the syntax, when editing existing script code. Your MTE script example does not look good, I doubt, that it could do something useful.

Try to find some other export script, which fits better to your wish - or write your own export script from scratch.
Hmm, what was your wish? What do you want to see in your report text file?

DD.20110223.0919.CET

I have an audio book with 5 main folders(Album) and sub folders within (named Part/Disc etc) containing 498 files.

How can I export to a text file showing

Album folder
Part/ Disc folder showing track numbers

:rolleyes: Genevieve

Well, you are going to print out - or maybe virtually as a text file - a report of about 10 pages.
Think about the trees - for what purpose do you need this?

I am a bit confused ... you speek about folders on your hard disk, right?
And there are sub folders with names, which contain a slash character? (e. g. "Part/ Disc").
This is simply not possible, because the slash is not allowed to be written in a folder name.

You have described your environment, and I have understand it as following ...

I have an audio book
   with 5 main folders(Album)
     and sub folders within (named Part/Disc etc)
        containing 498 files.

How can I export to a text file showing

Album folder
Part/ Disc folder showing track numbers

AudioBook               = <no Mp3tag Variable available>
   Album1                = %_PARENT_DIRECTORY%
      Part1/Disc1       = %_DIRECTORY%
         TrackN-File1   = %_FILENAME%
         TrackN-File...
      PartX/DiscY
         TrackN-File1
         TrackN-File...
   Album2
      Part1/Disc1
         TrackN-File1
         TrackN-File...
      PartX/DiscY
         TrackN-File1
         TrackN-File...
   Album3
      Part1/Disc1
         TrackN-File1
         TrackN-File...
      PartX/DiscY
         TrackN-File1
         TrackN-File...
   Album4
      Part1/Disc1
         TrackN-File1
         TrackN-File...
      PartX/DiscY
         TrackN-File1
         TrackN-File...
   Album5
      Part1/Disc1
         TrackN-File1
         TrackN-File...
      PartX/DiscY
         TrackN-File1
         TrackN-File... (498)

It looks like you need ... a loop or a staggered loop over all selected files.
As a starting point you can try the following mte script.

$filename(O:\TEST\20110224.Test.Genevieve.txt) $loop(%_parent_directory%)$loop(%_directory%)$loop(%_filename%)%_parent_directory%' | '%_directory%' | '%_filename% $loopend()$loopend()$loopend()

It would be helpful to have a view of the content of the really existent folder tree on your disk.
And it would be helpful to know if there are tag fields in the files which could give some information about themselves.

You can try the attached command line script "TreeView.cmd" and see if it can help to get overview of the Audiobook folder.
Simply drag and drop the Audiobook's root folder name onto the icon of the command file.
TreeView.cmd.txt (1.15 KB) (remove ".txt" file extension before usage)

You can try the attached command line script "FileList.cmd" and see if it can help to get overview of the Audiobook folder.
Simply drag and drop the Audiobook's root folder name onto the icon of the command file.
FileList.cmd.txt (1.34 KB) (remove ".txt" file extension before usage)

DD.20110224.0812.CET
Edit. Added an additional sorting step into the FileList.cmd.
DD.20110225.1051.CET

TreeView.cmd.txt (1.15 KB)

FileList.cmd.txt (1.34 KB)

I've uploaded List and tree reports generated by the helpful files you indicayed above, also a file called MPEG collection for your perusal. YOU ARE A LITTLE TREASURE

List.txt (29.8 KB)

MPEG_Collection.txt (2.67 KB)

I know - and even more :rolleyes: Thanks.

So ... regarding your example list ... there is a folder structure ...

E:\AUDIO BOOKS\At The Villa Of Reduced Circumstances\
E:\AUDIO BOOKS\At The Villa Of Reduced Circumstances\Disc 01\
...
E:\AUDIO BOOKS\At The Villa Of Reduced Circumstances\Disc 04\

E:\AUDIO BOOKS\Death of a Travelling Man\
E:\AUDIO BOOKS\Death of a Travelling Man\Part 1\
...
E:\AUDIO BOOKS\Death of a Travelling Man\Part 4\

E:\AUDIO BOOKS\Thriller\
E:\AUDIO BOOKS\Thriller\Part 01\
...
E:\AUDIO BOOKS\Thriller\Part 18\

This looks as if can Mp3tag handle this without much additional efforts.
The folder path is constructed as ...
E:\AUDIO BOOKS\%_parent_directory%\%_directory%\

I know you need some other more detailed output result, but did you try the mte script from above pos #4 and does it basically work for you?
If so, then we have a good starting point.

This is irritating ...

E:\AUDIO BOOKS\Thriller\Part 10\01 Spirit Walker .mp3
E:\AUDIO BOOKS\Thriller\Part 10\010 Spirit Walker .mp3
E:\AUDIO BOOKS\Thriller\Part 10\011 Spirit Walker .mp3
E:\AUDIO BOOKS\Thriller\Part 10\012 Spirit Walker .mp3
E:\AUDIO BOOKS\Thriller\Part 10\013 Spirit Walker .mp3
E:\AUDIO BOOKS\Thriller\Part 10\02 Spirit Walker .mp3

What does the three digit track number mean?

This is irritating ...

E:\AUDIO BOOKS\Thriller\Part 13\ 05 Interlude at Duane's .mp3
E:\AUDIO BOOKS\Thriller\Part 14\01 Surviving Toronto .mp3
E:\AUDIO BOOKS\At The Villa Of Reduced Circumstances\Disc 01\01  At the Villa Of Reduced Circumstances.mp3

Why do the filenames have surrounding resp. trailing spaces?
Why is there a double space between the track number and the following part in the filename?
It is also irritating that the folder names do not carry those quirks. :wink:
Track 8 is missing from "At The Villa Of Reduced Circumstances".

Either having leading track numbers of one digit or two digits in the file name or trailing in the directory name should be no problem.

E:\AUDIO BOOKS\Thriller\Part 04\01 Kowalski's in Love .mp3
E:\AUDIO BOOKS\Thriller\Part 12\1 Goodnight Sweet Mother.mp3
E:\AUDIO BOOKS\Death of a Travelling Man\Part 1\01  Death of A Travelling Man.mp3

... but to make life easier I strongly recommend to give the names overall the same wording structure and clean up the folder names and file names as the first step before going on to other activities!

For example:

$regexp(%_filename%,'(?#shrink multi spaces to one space)\s+',' ') $regexp(%_filename%,'(?#remove leading trailing spaces)^\s+|\s+$',) $regexp(%_filename%,'(?#remove leading zeroes)^0+',)

Beside the fact of un-systematically named folders and files, are the mp3 files internally well tagged?
Is there a tag field DISCNUMBER filled with the Disc resp. part number?
Is there a tag field TRACK filled with the track number?
Is there a tag field, which carries the album title, e. g. "Thriller" or "At The Villa Of Reduced Circumstances"?

Please explain ...

... generate numerical intervals for filenames or tracks, 
(e.g 5-7 or 136-245) which is what I want to be able to do in MP3 Tag

Regarding your question ...

How can I export to a text file showing
Album folder
Part/ Disc folder showing track numbers

... do you want to know what would be the steps of doing so using the Mp3tag user interface?
... do you want to visualize additional informations like track duration, sum of play time, files per folder, folders per album, and such things?

DD.20110225.1231.CET

QUOTE (DetlevD @ Feb 25 2011, 22:05) <{POST_SNAPBACK}>
I know - and even more :rolleyes: Thanks.

So ... regarding your example list ... there is a folder structure ...

E:\AUDIO BOOKS\At The Villa Of Reduced Circumstances\
E:\AUDIO BOOKS\At The Villa Of Reduced Circumstances\Disc 01\
...
E:\AUDIO BOOKS\At The Villa Of Reduced Circumstances\Disc 04\

E:\AUDIO BOOKS\Death of a Travelling Man\
E:\AUDIO BOOKS\Death of a Travelling Man\Part 1\
...
E:\AUDIO BOOKS\Death of a Travelling Man\Part 4\

E:\AUDIO BOOKS\Thriller\
E:\AUDIO BOOKS\Thriller\Part 01\
...
E:\AUDIO BOOKS\Thriller\Part 18\

This looks as if can Mp3tag handle this without much additional efforts.
The folder path is constructed as ...
E:\AUDIO BOOKS\%_parent_directory%\%_directory%\

I know you need some other more detailed output result, but did you try the mte script from above pos #4 and does it basically work for you?
If so, then we have a good starting point.


Yes it works....I've uploaded an example
This is irritating ...   CONSIDER THEM FIXED
E:\AUDIO BOOKS\Thriller\Part 10\01 Spirit Walker .mp3
E:\AUDIO BOOKS\Thriller\Part 10\010 Spirit Walker .mp3
E:\AUDIO BOOKS\Thriller\Part 10\011 Spirit Walker .mp3
E:\AUDIO BOOKS\Thriller\Part 10\012 Spirit Walker .mp3
E:\AUDIO BOOKS\Thriller\Part 10\013 Spirit Walker .mp3
E:\AUDIO BOOKS\Thriller\Part 10\02 Spirit Walker .mp3

What does the three digit track number mean?

[code]This is irritating ...CONSIDER IT SORTED
[code]E:\AUDIO BOOKS\Thriller\Part 13\ 05 Interlude at Duane's .mp3
E:\AUDIO BOOKS\Thriller\Part 14\01 Surviving Toronto .mp3
E:\AUDIO BOOKS\At The Villa Of Reduced Circumstances\Disc 01\01  At the Villa Of Reduced Circumstances.mp3

Why do the filenames have surrounding resp. trailing spaces?
Why is there a double space between the track number and the following part in the filename?
It is also irritating that the folder names do not carry those quirks. :wink:
Track 8 is missing from "At The Villa Of Reduced Circumstances".[/code]

Either having leading track numbers of one digit or two digits in the file name or trailing in the directory name should be no problem.

E:\AUDIO BOOKS\Thriller\Part 04\01 Kowalski's in Love .mp3
E:\AUDIO BOOKS\Thriller\Part 12\1 Goodnight Sweet Mother.mp3
E:\AUDIO BOOKS\Death of a Travelling Man\Part 1\01  Death of A Travelling Man.mp3

... but to make life easier I strongly recommend to give the names overall the same wording structure and clean up the folder names and file names as the first step before going on to other activities![/code]

For example:

$regexp(%_filename%,'(?#shrink multi spaces to one space)\s+',' ') $regexp(%_filename%,'(?#remove leading trailing spaces)^\s+|\s+$',)

Beside the fact of un-systematically named folders and files, are the mp3 files internally well tagged?

Is there a tag field DISCNUMBER filled with the Disc resp. part number? no
Is there a tag field TRACK filled with the track number? YES
Is there a tag field, which carries the album title, e. g. "Thriller" or "At The Villa Of Reduced Circumstances"?yes

Please explain ...

... generate numerical intervals for filenames or tracks, 
(e.g 5-7 or 136-245) which is what I want to be able to do in MP3 Tag

 [b]for each folder I'd like know which tracks ar contained therein[/b]

Regarding your question ...

How can I export to a text file showing
Album folder
Part/ Disc folder showing track numbers

.. . do you want to know what would be the steps of doing so using the Mp3tag user interface?

... do you want to visualize additional informations like track duration, sum of play time, files per folder, folders per album, and such things? [code] YES, PLEASE...

DD.20110225.1231.CET

20110224.TestAt_the_Villa_Of_Reduced_Circum_stances.txt (2.27 KB)

For the case you want a quick textual overview of folders and their related files and their names you have got already the tools as two command files (TreeView.cmd and FileList.cmd).
Surprisingly fast! 20.000 files read in and sorted and put out in 2 seconds on an old XP machine.

For the case you want a textual overview of tracks within albums resp. books and their artists resp authors and playtime and track count and so on you can use Mp3tag export functionality.

Keep in mind that the Mp3tag export section, as simple as it seems to come along, is a rather complicated tool, it bears quirks and traps.
So try it for yourself but not give up to soon, if the result is not so good as you have expected.

Back to your data ... you should not look further more to the folder names and filenames, but to the fundamental data in the tag fields.
It is recommend to have these data as clear and fine as it ever can be.
If so, creating of filenames or foldernames and even moving of entire folder trees will be not cruel but relaxed work.

Do make TRACK, ARTIST, ALBUM, DISCNUMBER and so on having all correct values, no leading and traling spaces, no multi spaces, numbers well and uniformed formatted.

For creating the report we take all data from the tag fields, because you do not want a folder and file list from the filesystem but an overview of Audiobooks, their titles and authors and playtime.

Take the attached mte export script and run it on the selected tracks of the audiobooks.
I give you this script as is, no more support available, adapt it to your needs as suitable.
Export_Text___Artist.Book.Disc.Track.mte (981 Bytes)

The mte script will create a report like the example in the attached file.
Export_Text___Artist.Book.Disc.Track.txt (14.9 KB)

DD.20110226.1355.CET

Export_Text___Artist.Book.Disc.Track.mte (981 Bytes)

Export_Text___Artist.Book.Disc.Track.txt (14.9 KB)