Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Use PowerShell to Create Temporary File Name

$
0
0

Summary: Use Windows PowerShell to create a temporary file name.

Hey, Scripting Guy! Question I need to output data to a file, but I do not need a permanent file name and location because
           the file will be later deleted. How can I easily use Windows PowerShell to create a temporary file name?

Hey, Scripting Guy! Answer Use the GetTempFileName static method from the System.IO.Path .NET Framework class:

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


Viewing all articles
Browse latest Browse all 3333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>