-
-
Save anton-dudarev/10ca869e6d89bb3685e42a378c646068 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 hidden or 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