Last active
December 29, 2019 12:48
-
-
Save AndrewPla/d285812b9cd983b45a33b46dfcdfabbb to your computer and use it in GitHub Desktop.
Cross-platform function to create temp folders. Created by Justin Grote https://twitter.com/JustinWGrote/status/1190311627746267136
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function New-TempDirectory { | |
$pathToCreate = join-path ([io.path]::GetTempPath()) ([io.path]::GetRandomFileName()) | |
New-Item -ItemType Directory -Path $pathToCreate | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment