Related: #3442
Currently, New-TemporaryFile invariably creates temp. files with extension .tmp.
Sometimes, however, it is helpful to create temp. files with a specific filename extension.
Adding an -Extension parameter could provide that:
Desired behavior
> New-TemporaryFile -Extension .ps1
Directory: C:\Users\jdoe\AppData\Local\Temp
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 7/10/2017 9:53 PM 0 tmpE3B8.ps1
Environment data
PowerShell Core v6.0.0-beta.3
Related: #3442
Currently,
New-TemporaryFileinvariably creates temp. files with extension.tmp.Sometimes, however, it is helpful to create temp. files with a specific filename extension.
Adding an
-Extensionparameter could provide that:Desired behavior
Environment data