Description
Use the OSInfo.TempDirectory property to get the path to the folder where the operating system’s temporary files are stored.
Declaration
OSInfoObj.TempDirectory
| Read-Only Property | String | 
| OSInfoObj | An expression, variable or parameter that specifies a reference to an OSInfo object | |||
Applies To
The property is applied to the following object:
Property Value
A string that holds the path to the Windows OS temporary folder.
Example
The following example posts the path to the temporary folder to the test log.
JavaScript, JScript
function Test()
{
  var sTempFolder = Sys.OSInfo.TempDirectory;
  Log.Message(sTempFolder);
} 
Python
def Test():
  sTempFolder = Sys.OSInfo.TempDirectory
  Log.Message(sTempFolder)
VBScript
Sub Test
  Dim sTempFolder
  sTempFolder = Sys.OSInfo.TempDirectory
  Log.Message sTempFolder
End Sub
DelphiScript
procedure Test;
var sTempFolder;
begin
  sTempFolder := Sys.OSInfo.TempDirectory;
  Log.Message(sTempFolder);
end;
C++Script, C#Script
function Test()
{
  var sTempFolder = Sys["OSInfo"]["TempDirectory"];
  Log["Message"](sTempFolder);
} 
See Also
SystemDirectory Property
WindowsDirectory Property
CreateTempFileName Method
