# Add files, one-by-one to SAME INSTANCE of Mp3tag

**URL:** https://community.mp3tag.de/t/add-files-one-by-one-to-same-instance-of-mp3tag/67767
**Category:** Support
**Created:** [March 9, 2025, 1:18pm UTC](https://community.mp3tag.de/t/add-files-one-by-one-to-same-instance-of-mp3tag/67767 "2025-03-09T13:18:28Z")
**Posts on this page:** 6
**Page:** 2

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [March 10, 2025, 1:49pm UTC](https://community.mp3tag.de/t/add-files-one-by-one-to-same-instance-of-mp3tag/67767/21 "2025-03-10T13:49:24Z")

</div>

In my own test even a direct call like  
`mp3tag.exe playlist.m3u8`  
seems to work.

---

<div class="post-metadata">

### Author: ![Casual\_Tea](https://community.mp3tag.de/user_avatar/community.mp3tag.de/casual_tea/32/18886_2.png) [@Casual\_Tea](https://community.mp3tag.de/u/Casual_Tea)
#### Post date: [March 10, 2025, 1:56pm UTC](https://community.mp3tag.de/t/add-files-one-by-one-to-same-instance-of-mp3tag/67767/22 "2025-03-10T13:56:34Z")

</div>

> [@LyricsLover](#):
>
> mp3tag.exe playlist.m3u8

That does not work for me as it tries to search for it in the program folder.

 ![grafik](https://community.mp3tag.de/uploads/default/original/3X/c/4/c45aade2f7da99718baccafebe27d01fc793df62.png)  
This

```auto
mp3tag.exe "/fn:Lieblingssongs_lms.m3u8"

```

does work tho. `Z:` is a samba share mounted in Windows.

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [March 10, 2025, 2:09pm UTC](https://community.mp3tag.de/t/add-files-one-by-one-to-same-instance-of-mp3tag/67767/23 "2025-03-10T14:09:32Z")

</div>

Sorry, in my simplified example I forgot to say that it would be best if you use the complete path to both parts  
`"C:\Program Files\Mp3tag\mp3tag.exe"`  
and  
`"C:\Temp\My new created Playlist - 2025.m3u8"`  
if you want to ensure to be able to call it from anywhere.

This works fine if you start it - for example in - `%userprofile%` as  
`"C:\Program Files\Mp3tag\mp3tag.exe" "C:\Temp\My new created Playlist - 2025.m3u8"`

---

<div class="post-metadata">

### Author: ![Casual\_Tea](https://community.mp3tag.de/user_avatar/community.mp3tag.de/casual_tea/32/18886_2.png) [@Casual\_Tea](https://community.mp3tag.de/u/Casual_Tea)
#### Post date: [March 10, 2025, 3:07pm UTC](https://community.mp3tag.de/t/add-files-one-by-one-to-same-instance-of-mp3tag/67767/24 "2025-03-10T15:07:42Z")

</div>

Good to know.  
I chose to go a different route in my script. It first checks if Mp3tag is on PATH and if not, opens the Windows environment variable settings with instructions on how to add Mp3tag to PATH (if the OS is Windows). That way I don't have to assume where Mp3tag is installed and as long as it's on PATH, it doesn't matter.

---

<div class="post-metadata">

### Author: ![Casual\_Tea](https://community.mp3tag.de/user_avatar/community.mp3tag.de/casual_tea/32/18886_2.png) [@Casual\_Tea](https://community.mp3tag.de/u/Casual_Tea)
#### Post date: [March 17, 2025, 7:54pm UTC](https://community.mp3tag.de/t/add-files-one-by-one-to-same-instance-of-mp3tag/67767/25 "2025-03-17T19:54:52Z")

</div>

I changed the method to use a temporary playlist in [lyrict](https://github.com/AverageHoarder/lyrict).

```auto
def add_to_mp3tag(match_categories):
    # Create a temporary .m3u8 file containing all songs with linked lyrics
    file_paths = set() # Use a set to remove duplicates

    # Collect all file paths
    for audio_types in match_categories.values():
        for file_list in audio_types.values():
            file_paths.update(file_list)

    # Sort file paths
    sorted_paths = sorted(file_paths)

    # Write to .m3u8 file
    with open("lyrict_temp.m3u8", "w", encoding="utf-8") as f:
        f.write("#EXTM3U\n") # M3U8 header
        for file in sorted_paths:
            f.write(f"{file}\n")
    try:
        print("Waiting for Mp3tag to close before removing lyrict_temp.m3u8.")
        subprocess.run(["mp3tag", "/fn:lyrict_temp.m3u8"])
    except subprocess.CalledProcessError:
        print(f"Error while opening lyrict_temp.m3u8 in Mp3tag.")
    try:
        os.remove("lyrict_temp.m3u8")
    except:
        print("Could not remove lyrict_temp.m3u8.")

```

Now Mp3tag no longer flickers and hogs the foreground while opening tracks one at a time and it's also far quicker.

 ![grafik](https://community.mp3tag.de/uploads/default/original/3X/5/b/5bdcb85a14fa30d1c468ec2f4b689ef50f271527.png)

@LyricsLover thanks again for pointing out that playlists can be used!

---

<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: [April 16, 2025, 7:55pm UTC](https://community.mp3tag.de/t/add-files-one-by-one-to-same-instance-of-mp3tag/67767/26 "2025-04-16T19:55:46Z")

</div>

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

[Previous page](https://community.mp3tag.de/t/add-files-one-by-one-to-same-instance-of-mp3tag/67767.md?page=1)
