Export (0) Print
Expand All
Expand Minimize

Converting the FileSystemObject's GetTempName Method


Windows PowerShell


Definition: Generates a random 8-character file name with a .tmp file extension. Note that this method does not create the file, it only generates the name.

GetTempName


You can use GetTempFileName method of the .NET Framework’s Path object to generate a temporary file name in PowerShell:


[System.IO.Path]::GetTempFileName()


See conversions of other FileSystemObject methods and properties.
Return to the VBScript to Windows PowerShell home page

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft