# $GetEnv in Mp3Tag 2.48a

**URL:** <https://community.mp3tag.de/t/getenv-in-mp3tag-2-48a/11774>\
**Category:** Support\
**Created:** [March 25, 2011, 8:36pm UTC](https://community.mp3tag.de/t/getenv-in-mp3tag-2-48a/11774 "2011-03-25T20:36:47Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![pone](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pone/32/272_2.png) [@pone](https://community.mp3tag.de/u/pone)\
**Post date:** [March 25, 2011, 8:36pm UTC](https://community.mp3tag.de/t/getenv-in-mp3tag-2-48a/11774/1 "2011-03-25T20:36:47Z")

</div>

Just saw the new **$getenv(x)** function.  
Translated form the German help file of the development build:  
**$getenv(x)** returns the value of the environment variable x.

Never heard of environment variables before, so some questions:

Is there a list of the environment variables which can be used?  
Can this list be expanded in Windows by the User?  
Is there a variable for the clipboard (ctrl+c/ctrl+v) or can this be created?

So far, I found this list on wikipedia:  
[http://en.wikipedia.org/wiki/Environment\_v...crosoft\_Windows](http://en.wikipedia.org/wiki/Environment_variable#Default_Values_on_Microsoft_Windows)

---

<div class="post-metadata">

**Author:** ![mjcm](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/9d8465/32.png) [@mjcm](https://community.mp3tag.de/u/mjcm)\
**Post date:** [March 26, 2011, 8:27am UTC](https://community.mp3tag.de/t/getenv-in-mp3tag-2-48a/11774/2 "2011-03-26T08:27:58Z")

</div>

Pone,

to see the current Environment Variables on your PC, just goto a command Prompt and issue the command SET, this will display all environment variables and their values for your computer / userid.

This article should help a bit with the other questions.

[http://vlaurie.com/computers2/Articles/environment.htm](http://vlaurie.com/computers2/Articles/environment.htm)

---

<div class="post-metadata">

**Author:** ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)\
**Post date:** [March 26, 2011, 11:31am UTC](https://community.mp3tag.de/t/getenv-in-mp3tag-2-48a/11774/3 "2011-03-26T11:31:16Z")

</div>

> [@pone](#):
>
> ... Never heard of enviroment variables before ...

Hmm ... never used %appdata% so far?

> [@pone](#):
>
> ... Is there a list of the enviroment variables which can be used?...

The attached Mp3tag MTE export script displays some usual environment variables in a text file.

Export Skript Version 1.0  
Test.getEnv.mte ( 1.54K ) : 28  
DD.20110326.1333.CET

Export Skript Version 1.1  
[Test.getEnv.mte](https://community.mp3tag.de/uploads/default/original/2X/1/1852a2cc96f509de6b8d7a1352265a666299afd5.mte) (1.85 KB)  
DD.20110522.1906.CEST

[Test.getEnv.mte](https://community.mp3tag.de/uploads/default/original/2X/1/1852a2cc96f509de6b8d7a1352265a666299afd5.mte) (1.85 KB)

---

<div class="post-metadata">

**Author:** ![pone](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pone/32/272_2.png) [@pone](https://community.mp3tag.de/u/pone)\
**Post date:** [March 26, 2011, 11:38am UTC](https://community.mp3tag.de/t/getenv-in-mp3tag-2-48a/11774/4 "2011-03-26T11:38:53Z")

</div>

Thank you for your answers.

Yes, i used %appdata%, but i didn't know that this is an environment variable. I just used it.

So, as far as I can see there seems to be no environment variable for the clipboard and it can't be created, right?

---

<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:** [March 26, 2011, 6:02pm UTC](https://community.mp3tag.de/t/getenv-in-mp3tag-2-48a/11774/5 "2011-03-26T18:02:12Z")

</div>

> [@pone](#):
>
> ... that this is an environment variable....

You can see additional non-Microsoft environment variables if you press [windows-key]-[break/pause], select tab-folder Extended and press the button "environment variables".  
In this dialogue you can add, edit, delete user-defined environment variables.

In the old days these variables were set by the file autoexec.bat or win.ini.

---

<div class="post-metadata">

**Author:** ![Flskydiver](https://community.mp3tag.de/user_avatar/community.mp3tag.de/flskydiver/32/8129_2.png) [@Flskydiver](https://community.mp3tag.de/u/Flskydiver)\
**Post date:** [May 22, 2011, 1:01pm UTC](https://community.mp3tag.de/t/getenv-in-mp3tag-2-48a/11774/6 "2011-05-22T13:01:19Z")

</div>

> [@DetlevD](#):
>
> Hmm ... never used %appdata% so far?
> 
> The attached Mp3tag MTE export script displays some usual environment variables in a text file.
> 
> Attachment 3793 not found.  
> DD.20110326.1333.CET

DetlevD,

I looked up this thread after reading your response to me in a different forum, to learn about the $getEnv function you added to my .mte ...

I seem to have trouble returning anything on these (the links in your .mte utilizing $getEnv did not work). I have the same problem when I just use %UserProfile%\Desktop, for example. I get an error that the file cannot be opened and imbedded links in the export don't work.

Here is what I get when I run your test .mte:

```
EnvironmentVariableName = Value
--------------------------------------------------------------------------------
ALLUSERSPROFILE = $getEnv(ALLUSERSPROFILE)
APPDATA = $getEnv(APPDATA)
CLASSPATH = $getEnv(CLASSPATH)
CLIENTNAME = $getEnv(CLIENTNAME)
CommonProgramFiles = $getEnv(CommonProgramFiles)
COMPUTERNAME = $getEnv(COMPUTERNAME)
ComSpec = $getEnv(ComSpec)
COPYCMD = $getEnv(COPYCMD)
DIRCMD = $getEnv(DIRCMD)
HOMEDRIVE = $getEnv(HOMEDRIVE)
HOMEPATH = $getEnv(HOMEPATH)
LOGONSERVER = $getEnv(LOGONSERVER)
NUMBER_OF_PROCESSORS = $getEnv(NUMBER_OF_PROCESSORS)
OS = $getEnv(OS)
Path = $getEnv(Path)
PATHEXT = $getEnv(PATHEXT)
PROCESSOR_ARCHITECTURE = $getEnv(PROCESSOR_ARCHITECTURE)
PROCESSOR_IDENTIFIER = $getEnv(PROCESSOR_IDENTIFIER)
PROCESSOR_LEVEL = $getEnv(PROCESSOR_LEVEL)
PROCESSOR_REVISION = $getEnv(PROCESSOR_REVISION)
ProgramFiles = $getEnv(ProgramFiles)
SystemDrive = $getEnv(SystemDrive)
SystemRoot = $getEnv(SystemRoot)
TEMP = $getEnv(TEMP)
TMP = $getEnv(TMP)
USERDOMAIN = $getEnv(USERDOMAIN)
USERNAME = $getEnv(USERNAME)
USERPROFILE = $getEnv(USERPROFILE)
windir = $getEnv(windir)
--------------------------------------------------------------------------------

```

I'm on Windows 7 HP 64bit SP1

Thanks...

---

<div class="post-metadata">

**Author:** ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)\
**Post date:** [May 22, 2011, 1:32pm UTC](https://community.mp3tag.de/t/getenv-in-mp3tag-2-48a/11774/7 "2011-05-22T13:32:50Z")

</div>

> [@Flskydiver](#):
>
> ... I seem to have trouble returning anything on these ... problem when I just use %UserProfile%\Desktop ... I'm on Windows 7 HP 64bit SP1 ...

Anyone other Mp3tag user out there with the same problem?  
Florian, what could it be?

'Flskydiver', make sure to use the latest Mp3tag development version 2.48d.  
[2011-03-21] NEW: scripting function $getEnv.  
[2011-04-18] NEW: support for inbuilt parameters MP3TAGAPP and MP3TAGAPPDATA for $getEnv.

DD.20110522.1733.CEST

---

<div class="post-metadata">

**Author:** ![Flskydiver](https://community.mp3tag.de/user_avatar/community.mp3tag.de/flskydiver/32/8129_2.png) [@Flskydiver](https://community.mp3tag.de/u/Flskydiver)\
**Post date:** [May 22, 2011, 2:12pm UTC](https://community.mp3tag.de/t/getenv-in-mp3tag-2-48a/11774/8 "2011-05-22T14:12:36Z")

</div>

> [@DetlevD](#):
>
> 'Flskydiver', make sure to use the latest Mp3tag development version 2.48d.  
> [2011-03-21] NEW: scripting function $getEnv.  
> [2011-04-18] NEW: support for inbuilt parameters MP3TAGAPP and MP3TAGAPPDATA for $getEnv.

Oh, I'm on 2.48 so maybe that's the problem. I will update and try again.

[Edit]

According to the release notes that should be it, I think - Sorry for the misunderstanding.  
(Didn't realize you snuck beta features into my .mte - lol!)

---

<div class="post-metadata">

**Author:** ![Flskydiver](https://community.mp3tag.de/user_avatar/community.mp3tag.de/flskydiver/32/8129_2.png) [@Flskydiver](https://community.mp3tag.de/u/Flskydiver)\
**Post date:** [May 22, 2011, 2:28pm UTC](https://community.mp3tag.de/t/getenv-in-mp3tag-2-48a/11774/9 "2011-05-22T14:28:12Z")

</div>

> [@Flskydiver](#):
>
> (Didn't realize you snuck beta features into my .mte - lol!)

Yep, that did it. My bad!

---

<div class="post-metadata">

**Author:** ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)\
**Post date:** [March 27, 2014, 11:50am UTC](https://community.mp3tag.de/t/getenv-in-mp3tag-2-48a/11774/10 "2014-03-27T11:50:15Z")

</div>

Thanks for this Detlev.

```
### Caution ### This script needs version Mp3tag v2.48d ###

```

I find it is OK with V2.58.

---

<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:** [February 9, 2026, 12:23pm UTC](https://community.mp3tag.de/t/getenv-in-mp3tag-2-48a/11774/11 "2026-02-09T12:23:00Z")

</div>

Closed on February 9, 2026, 12:23pm UTC


