# \[Feature Request\] Playlist All export - Remember last export

**URL:** https://community.mp3tag.de/t/feature-request-playlist-all-export-remember-last-export/62112
**Category:** General Discussion
**Created:** [September 13, 2023, 1:35pm UTC](https://community.mp3tag.de/t/feature-request-playlist-all-export-remember-last-export/62112 "2023-09-13T13:35:30Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![kittmaster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/kittmaster/32/14793_2.png) [@kittmaster](https://community.mp3tag.de/u/kittmaster)
#### Post date: [September 13, 2023, 1:35pm UTC](https://community.mp3tag.de/t/feature-request-playlist-all-export-remember-last-export/62112/1 "2023-09-13T13:35:30Z")

</div>

Looking for a quality of life feature. When Export \> Playlist All Files is used, it seems to default to the launched directory it was called from on context click. Is it possible for Mp3tag to have a running directory list or remember the last export file and path it used? My save location requires at least 6 clicks to get to where I need it for my workflow and if it could remember that path, it would be a helpful feature add.

Thanks.  
Chris

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [September 13, 2023, 1:53pm UTC](https://community.mp3tag.de/t/feature-request-playlist-all-export-remember-last-export/62112/2 "2023-09-13T13:53:27Z")

</div>

Instead of the default playlist generation, you could use an export script like this one

> [@Export mit Dateipfad](https://community.mp3tag.de/t/export-mit-dateipfad/46086/6):
>
> Das Beispiel lautet: $filename(m3u8,)#EXTM3U $loop(%track%)$loop(%\_filename\_ext%)#EXTINF:%\_length\_seconds%,%artist% - %title% %\_folderpath%%\_filename\_ext% $loopend()$loopend()

and replace the $filename() statement with an absolute path so that you playlist ends up in the same place all the time.

---

<div class="post-metadata">

### Author: ![kittmaster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/kittmaster/32/14793_2.png) [@kittmaster](https://community.mp3tag.de/u/kittmaster)
#### Post date: [September 13, 2023, 2:25pm UTC](https://community.mp3tag.de/t/feature-request-playlist-all-export-remember-last-export/62112/3 "2023-09-13T14:25:49Z")

</div>

I gave that a fast spin, I am finding that after I paste in the code to the MTE and execute it... the output is rewriting the MTE file as the playlist... So I'm missing something there... trying to figure it out.

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [September 13, 2023, 2:29pm UTC](https://community.mp3tag.de/t/feature-request-playlist-all-export-remember-last-export/62112/4 "2023-09-13T14:29:25Z")

</div>

If you need any further ideas, the actual code would be of interest.

---

<div class="post-metadata">

### Author: ![kittmaster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/kittmaster/32/14793_2.png) [@kittmaster](https://community.mp3tag.de/u/kittmaster)
#### Post date: [September 13, 2023, 2:31pm UTC](https://community.mp3tag.de/t/feature-request-playlist-all-export-remember-last-export/62112/5 "2023-09-13T14:31:57Z")

</div>

I found this (M3U section) and switched the path to D:\20 for my testing: [Export Configuration Archive](https://community.mp3tag.de/t/export-configuration-archive/1495)

> ```auto
> $filename(D:\20.m3u)#EXTM3U
> #EXTINF:-1,----- %_directory% (%_total_time2%) -------------------
> X:\----- %_directory% (%_total_time2%) -------------------.x$loop(%_filename_ext%)
> #EXTINF:%_length_seconds%,$if($or(%artist%,%title%),$if($not(%track%),,$num(%track%,2). ),)$if(%artist%,%artist% - %title%,%title%)$if($or(%artist%,%title%),,%_filename%)
> %_filename_ext%$loopend()
> 
> ```

But when I execute the script (for a single file export test), I get a windows error of:

**\> ---------------------------**  
**\> Mp3tag v3.22**  
**\> ---------------------------**  
**\> File "C:\Users\xxxxxxxxxxx\AppData\Roaming\Mp3tag\export\Export-CMB.mte"**  
**\> cannot be opened.**  
**\> ---------------------------**  
\*\*\> OK \*\*  
**\> ---------------------------**

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [September 13, 2023, 2:42pm UTC](https://community.mp3tag.de/t/feature-request-playlist-all-export-remember-last-export/62112/6 "2023-09-13T14:42:10Z")

</div>

Could it be that your text editor blocks the MTE file and that you have to close the editor first?  
I had no such problems.  
I performed the following steps:

- Copied the code from your post
- Pressed Ctrl-E to open the Export dialogue,
- Clicked on "New"
- got an editor windows with the sampe script code
- selected all of the code and
- pasted the code from the clipboard,
- adapted the filename to `c:\temp\20.m3u`  
... and got a file 20 with the extension m3u in the folder `c:\temp`

---

<div class="post-metadata">

### Author: ![kittmaster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/kittmaster/32/14793_2.png) [@kittmaster](https://community.mp3tag.de/u/kittmaster)
#### Post date: [September 13, 2023, 3:37pm UTC](https://community.mp3tag.de/t/feature-request-playlist-all-export-remember-last-export/62112/8 "2023-09-13T15:37:29Z")

</div>

It probably didn't work because I'm an idiot. I was trying to run it from the script menu instead of the export menu option (been a while since I'm used the app like this). I got it working "almost" exactly as I want using:

> $filename(C:\Users\XXXXXXXXXXXx\Desktop\MP4 Videos For Listening-Test.m3u,utf-8)  
> #EXTM3U $loop(%track%)$loop(%\_filename\_ext%)  
> #EXTINF:%\_length\_seconds%,%artist% - %title%  
> %\_folderpath%%\_filename\_ext% $loopend()$loopend()

The file is properly generated and works as expected, with one caveat..... the very first line of the text file is blank and the info starts on line 2 using Notepad++. Is there a way to prevent a carriage return on the first line? I can manually delete it, but that is just silliness over time. Thanks for the help, hopefully this issue is something easily fixed?

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [September 13, 2023, 3:44pm UTC](https://community.mp3tag.de/t/feature-request-playlist-all-export-remember-last-export/62112/9 "2023-09-13T15:44:49Z")

</div>

The number of lines in the script are also reflected in the output.  
So if you merge the first line with the first output word, it should be ok:

```auto
$filename(C:\Users\XXXXXXXXXXXx\Desktop\MP4 Videos For Listening-Test.m3u,utf-8)#EXTM3U $loop(%track%)$loop(%_filename_ext%)
#EXTINF:%_length_seconds%,%artist% - %title%
%_folderpath%%_filename_ext% $loopend()$loopend()

```

---

<div class="post-metadata">

### Author: ![kittmaster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/kittmaster/32/14793_2.png) [@kittmaster](https://community.mp3tag.de/u/kittmaster)
#### Post date: [September 13, 2023, 3:54pm UTC](https://community.mp3tag.de/t/feature-request-playlist-all-export-remember-last-export/62112/10 "2023-09-13T15:54:30Z")

</div>

That fixed it and it starts at the top now. Thanks.

The only other function thought I had about doing it this way is that I have to force a select all or it only exports a single line or select array... Is there a command that will tell the script to force an internal "select all" kind of like the menu does by default in the program?

---

<div class="post-metadata">

### Author: ![kittmaster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/kittmaster/32/14793_2.png) [@kittmaster](https://community.mp3tag.de/u/kittmaster)
#### Post date: [September 13, 2023, 3:55pm UTC](https://community.mp3tag.de/t/feature-request-playlist-all-export-remember-last-export/62112/11 "2023-09-13T15:55:37Z")

</div>

And is it possible to remove my deleted posted... the edit history shows my edit... and the point of the delete was to remove my name. I thought deleting it would nuke the post altogether, seems that isn't the case.

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [September 13, 2023, 4:03pm UTC](https://community.mp3tag.de/t/feature-request-playlist-all-export-remember-last-export/62112/12 "2023-09-13T16:03:02Z")

</div>

> [@kittmaster](#):
>
> $loop(%track%)

In your script you should replace that with `$loop(1)` so that the order in the file list is kept. Otherwise the files will be sorted by track number.  
No, there is no function to generate an export for "all". The export is always generated for the currently selected files. You would have to press Ctrl-A to select all.

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [September 13, 2023, 4:06pm UTC](https://community.mp3tag.de/t/feature-request-playlist-all-export-remember-last-export/62112/13 "2023-09-13T16:06:06Z")

</div>

Perhaps all this a little over the top. If that was the case: sorry.

I mean: you could also set a default filename for the playlists in the options:  
Ctrl-OPlaylist  
And if that filename follows similar rules like the one in the export script, you should get the "playlist for all" function.

---

<div class="post-metadata">

### Author: ![kittmaster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/kittmaster/32/14793_2.png) [@kittmaster](https://community.mp3tag.de/u/kittmaster)
#### Post date: [September 13, 2023, 5:40pm UTC](https://community.mp3tag.de/t/feature-request-playlist-all-export-remember-last-export/62112/14 "2023-09-13T17:40:04Z")

</div>

LOL, it was a good learning experience... the built in playlist in options solves it all... I just put the path and the filename I want... every change.. blamo.... new playlist on save... Thanks for the help and tips... much appreciated.

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [October 13, 2023, 5:40pm UTC](https://community.mp3tag.de/t/feature-request-playlist-all-export-remember-last-export/62112/15 "2023-10-13T17:40:58Z")

</div>

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