Export csv file in same order as shown in mp3tag

Hi guys, when exporting to csv, the order of the items change with relation to what is shown in the main mp3tag window. Is there any easy way to keepp the order the same?

Unfortunately, you do not show us the export script.
In general, the most important $loop() should be $loop(1) and should not contain any variable or so.

Here is the script, attached. Please note the "played1" and "played2" are custom fields for personal use. They may be temporarily omitted.
csv-playlist.mte (201 Bytes)

Instead of
$loop(%_filename_ext%)
use
$loop(1)

Thanks, I can certainly try that.

On a foot note:
This is the script I got:

$filename(csv,utf-16)Sequence;Title;Artist;Album;Length;Duration;Start;End
$loop(%_filename_ext%)%sequence%;%title%;%artist%;%album%;%_length_seconds%;;;;
$loopend()Divide;length;by;86400;for;mm:ss

IMHO it does not contain

So is this the correct script?

That is the correct script; sorry, still early morning and I haven't woken up yet!
I've tried your suggestion and it is almost the way I want it. Please see attached. I need the csv to be in exactly the same order as the m3u file. I can do that by adding the field 'sequence', then physically change numbers from top to bottom, 1 to how ever many, use the data sorting in the csv file. However, there should be another way.


csv-playlist2.mte (187 Bytes)
This is the modified file.

$filename(csv,utf-16)Sequence;Title;Artist;Album;Length;Duration;Start;End
$loop(1)%sequence%;%title%;%artist%;%album%;%_length_seconds%;;;;
$loopend()Divide;length;by;86400;for;mm:ss

The modification looks OK to me? Doesn't it produce the expected result?

The field Sequence should not be necessary with $loop(1).

Wow! Thanks very much, the exact way I need it to be. Have a great day/evening. :smiley:

Is there any way I can add a field, such as "item", which automatically starts at 1 and counting the number of items in a list?

Where? In the export script? Then try:

$filename(csv,utf-16)Sequence;Title;Artist;Album;Length;Duration;Start;End
$loop(1)$num(%_counter%,2);%title%;%artist%;%album%;%_length_seconds%;;;;
$loopend()Divide;length;by;86400;for;mm:ss