Windows TEMP

BlitzMax Forums/BlitzMax Programming/Windows TEMP

Filax(Posted 2005) [#1]
Anybody have an idea to get the windows temp directory ?


ziggy(Posted 2005) [#2]
Local MyTempFolder:String = getenv_("TEMP")


Filax(Posted 2005) [#3]
Many thanks Ziggy !


ziggy(Posted 2005) [#4]
Hey! in some windows version the TEMP folder is defined by a veriable called TMP instead of TEMP, so you should do something like:

Function GetTempFolder:String()
Local Aux:String = getenv_("TEMP")
If Aux = "" Then Aux = getenv_("TMP")
Return Aux
End Function