# Global Variable

**URL:** https://community.mp3tag.de/t/global-variable/68286
**Category:** Support
**Created:** [April 22, 2025, 11:56am UTC](https://community.mp3tag.de/t/global-variable/68286 "2025-04-22T11:56:42Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Roland](https://community.mp3tag.de/user_avatar/community.mp3tag.de/roland/32/8001_2.png) [@Roland](https://community.mp3tag.de/u/Roland)
#### Post date: [April 22, 2025, 11:56am UTC](https://community.mp3tag.de/t/global-variable/68286/1 "2025-04-22T11:56:43Z")

</div>

Is there a way to modify an existing environment variable in MP3Tag?

---

<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: [April 22, 2025, 12:06pm UTC](https://community.mp3tag.de/t/global-variable/68286/2 "2025-04-22T12:06:24Z")

</div>

You could call an external CMD-Batch to achieve this.  
But I'm not sure if such a change would survive a Windows reboot.

Why would you like to change an environment variable with Mp3tag?

---

<div class="post-metadata">

### Author: ![Roland](https://community.mp3tag.de/user_avatar/community.mp3tag.de/roland/32/8001_2.png) [@Roland](https://community.mp3tag.de/u/Roland)
#### Post date: [April 22, 2025, 3:50pm UTC](https://community.mp3tag.de/t/global-variable/68286/3 "2025-04-22T15:50:25Z")

</div>

I want to remember the track where I stopped the processing.

---

<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: [April 22, 2025, 4:01pm UTC](https://community.mp3tag.de/t/global-variable/68286/4 "2025-04-22T16:01:44Z")

</div>

You could write a simple export file with the filename or complete path name?

---

<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: [April 22, 2025, 6:51pm UTC](https://community.mp3tag.de/t/global-variable/68286/5 "2025-04-22T18:51:16Z")

</div>

> [@LyricsLover](#):
>
> write a simple export file

Or you could set a user-defined tag field that is only present in processed files.  
A filter in MP3tag would then show all the files without that marker.

---

<div class="post-metadata">

### Author: ![Doug\_Mackie](https://community.mp3tag.de/user_avatar/community.mp3tag.de/doug_mackie/32/279_2.png) [@Doug\_Mackie](https://community.mp3tag.de/u/Doug_Mackie)
#### Post date: [April 22, 2025, 9:50pm UTC](https://community.mp3tag.de/t/global-variable/68286/6 "2025-04-22T21:50:39Z")

</div>

> [@Roland](#):
>
> I want to remember the track where I stopped the processing.

There are sooo many ways to keep track of processed files, depending on your work flow.

My method relies on three folders and on applying a unique file name style at the end. The folders used are: Current Downloads, M4aRaw, and M4aDone.

First I move ten files from the Current Downloads folder to M4aRaw for tagging. After all ten files are tagged or edited, I convert the tags to file names with this simple format:

**%artist% (%year%) %title% (%vocalist%)**

The resulting names are always very different than the raw input file names, so there is no possibility of confusion. I then move the fully processed files into the M4aDone folder. Then the cycle begins again for the next ten files from the Current Downloads folder.

So by glancing at the three folders, I can see exactly what I have done and what remains to be done for a given project. No special variable is needed.

---

<div class="post-metadata">

### Author: ![Roland](https://community.mp3tag.de/user_avatar/community.mp3tag.de/roland/32/8001_2.png) [@Roland](https://community.mp3tag.de/u/Roland)
#### Post date: [April 24, 2025, 8:29pm UTC](https://community.mp3tag.de/t/global-variable/68286/7 "2025-04-24T20:29:19Z")

</div>

Dear fellow travellers,

Thank you very much for your creative ideas.

The information is also needed at operating system level to continue dependent processes there. Therefore, these ideas are not the solution for the task mentioned.

---

<div class="post-metadata">

### Author: ![MotleyG](https://community.mp3tag.de/user_avatar/community.mp3tag.de/motleyg/32/440_2.png) [@MotleyG](https://community.mp3tag.de/u/MotleyG)
#### Post date: [April 24, 2025, 9:20pm UTC](https://community.mp3tag.de/t/global-variable/68286/8 "2025-04-24T21:20:58Z")

</div>

> [@Roland](#):
>
> I want to remember the track where I stopped the processing.

> [@Roland](#):
>
> The information is also needed at operating system level to continue dependent processes there. Therefore, these ideas are not the solution for the task mentioned.

You can always use the "Date Modified" to sort and get anything last changed looking outside of mp3tag.

---

<div class="post-metadata">

### Author: ![Roland](https://community.mp3tag.de/user_avatar/community.mp3tag.de/roland/32/8001_2.png) [@Roland](https://community.mp3tag.de/u/Roland)
#### Post date: [April 26, 2025, 7:41pm UTC](https://community.mp3tag.de/t/global-variable/68286/9 "2025-04-26T19:41:20Z")

</div>

Yes, Motley you're right, the "Date modified" can be helpful.  
But in the given case it's not that easy as the other processses don't touch the date stamp,they work on a directory level. 😪  
I loved to hear from your experience but my search isn't finished yet.

---

<div class="post-metadata">

### Author: ![MotleyG](https://community.mp3tag.de/user_avatar/community.mp3tag.de/motleyg/32/440_2.png) [@MotleyG](https://community.mp3tag.de/u/MotleyG)
#### Post date: [April 26, 2025, 8:54pm UTC](https://community.mp3tag.de/t/global-variable/68286/10 "2025-04-26T20:54:49Z")

</div>

> [@Roland](#):
>
> they work on a directory level.

But this has no concern for mp3tag as only files can be actually updated with new detail and that can be marked by the modification date. Yes the directories can be changed as well, but this would be a byproduct of the file changes.

---

<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: [April 30, 2025, 5:27am UTC](https://community.mp3tag.de/t/global-variable/68286/11 "2025-04-30T05:27:47Z")

</div>

> [@Roland](#):
>
> But in the given case it's not that easy as the other processses don't touch the date stamp,they work on a directory level

You are very vague in respect to what the requirements of the

> [@Roland](#):
>
> other processses

may be. I find it particularly strange that these processes rely on system variables instead of easily accessible attributes like updated information from the filesystem.  
A system variable would be something managed by the OS - so it would require an OS command to set it.  
The most straightforward way would be to

> [@LyricsLover](#):
>
> call an external CMD-Batch

You have not yet told us why that method does not work.

---

<div class="post-metadata">

### Author: ![Roland](https://community.mp3tag.de/user_avatar/community.mp3tag.de/roland/32/8001_2.png) [@Roland](https://community.mp3tag.de/u/Roland)
#### Post date: [April 30, 2025, 9:36am UTC](https://community.mp3tag.de/t/global-variable/68286/12 "2025-04-30T09:36:59Z")

</div>

I have no idea how to modify an CMD-Batch from inside MP3Tag.  
How can this be done?

---

<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: [April 30, 2025, 9:41am UTC](https://community.mp3tag.de/t/global-variable/68286/13 "2025-04-30T09:41:57Z")

</div>

You use a Batch CMD file to set your global variable with

`SET MyGlobaVariable="Whatever you want so save"`

Call the external Batch CMD file containing above line in an Option -\> Tools entry.  
Replace the fix text with a variable from Mp3tag and pass the content of this variable to your Batch CMD.

As long as you don't tell us exactly what you want to store in such a Global Variable we can only guess.

And BTW:  
How do you process this Global Variable once it has been set?

---

<div class="post-metadata">

### Author: ![Roland](https://community.mp3tag.de/user_avatar/community.mp3tag.de/roland/32/8001_2.png) [@Roland](https://community.mp3tag.de/u/Roland)
#### Post date: [April 30, 2025, 10:47am UTC](https://community.mp3tag.de/t/global-variable/68286/14 "2025-04-30T10:47:27Z")

</div>

I have just understood that the setting of an environment variable is a manual function call and cannot be done via a predefined action.

---

<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: [April 30, 2025, 12:50pm UTC](https://community.mp3tag.de/t/global-variable/68286/15 "2025-04-30T12:50:56Z")

</div>

What is the consequence?  
If the system variable is an absolute must then you have reached a dead end right now (so apparently, there is no solution).  
What will your workaround look like?  
Or isn't the system variable mandatory any more?

---

<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: [April 30, 2025, 1:57pm UTC](https://community.mp3tag.de/t/global-variable/68286/16 "2025-04-30T13:57:55Z")

</div>

I don't think that understanding that no Mp3tag action can directly set an environment variable (for your OS) is a solution to your original question:

> [@Roland](#):
>
> Is there a way to modify an existing environment variable in MP3Tag?

We offered several solutions, including how to modify an existing environment variable and other "remember the track where I stopped processing" workarounds.  
But none of them seem to fit your (still unclear) request, and we still don't know why they don't fit your needs.

---

<div class="post-metadata">

### Author: ![Roland](https://community.mp3tag.de/user_avatar/community.mp3tag.de/roland/32/8001_2.png) [@Roland](https://community.mp3tag.de/u/Roland)
#### Post date: [April 30, 2025, 3:16pm UTC](https://community.mp3tag.de/t/global-variable/68286/17 "2025-04-30T15:16:48Z")

</div>

> [@LyricsLover](#):
>
> I don't think that understanding that no Mp3tag action can directly set an environment variable (for your OS) is a solution to your original question

I understand that the answer to my original question is:

**NO, an environment variable cannot be changed via automatic procedure from inside MP3Tag.**

That made me realise that this approach was no longer effective for me.

---

<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: [April 30, 2025, 3:21pm UTC](https://community.mp3tag.de/t/global-variable/68286/18 "2025-04-30T15:21:31Z")

</div>

> [@Roland](#):
>
> NO, an environment variable cannot be changed via automatic procedure from inside MP3Tag.

This answer is not true.

It is true, that Mp3tag can not set an environment variable directly with an Action.

But you can use a Tool like this:

 ![image](https://community.mp3tag.de/uploads/default/original/3X/3/2/321a2888a1209a8d4e6a8333f6942824f36cced1.png)

After calling this Tool you will find the environment variable  
**LastProcessedFileName**  
in your list of environment variables like this:

 ![image](https://community.mp3tag.de/uploads/default/original/3X/4/b/4bb867135473c67ce06bb6ac5e8d731dece51363.png)

The used command SETX is available since Windows XP:

> **[setx](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/setx)**
>
> Reference article for the setx command, which creates or modifies environment variables in the user or system environment, without requiring programming or scripting.

---

<div class="post-metadata">

### Author: ![Roland](https://community.mp3tag.de/user_avatar/community.mp3tag.de/roland/32/8001_2.png) [@Roland](https://community.mp3tag.de/u/Roland)
#### Post date: [April 30, 2025, 4:40pm UTC](https://community.mp3tag.de/t/global-variable/68286/19 "2025-04-30T16:40:43Z")

</div>

Can this be done inside a procedure? ☹

---

<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: [April 30, 2025, 4:43pm UTC](https://community.mp3tag.de/t/global-variable/68286/20 "2025-04-30T16:43:42Z")

</div>

There is no such thing as "procedure" in Mp3tag.  
Can this be done with an Action: No.  
Can this be done with a Tool: Yes.  
Can a Tool have a keyboard shortcut like Ctrl + 1: [Yes](https://docs.mp3tag.de/customization/options/tools/).

There is no way to guess when you want to finish your work in Mp3tag and write the last processed filename. We don't have a procedure like "on Mp3tag exit do this or that".

[Next page](https://community.mp3tag.de/t/global-variable/68286.md?page=2)
