Skip to content

Instantly share code, notes, and snippets.

@DrIOSX
Last active June 11, 2021 14:53
Show Gist options
  • Save DrIOSX/0fbe87cb00e0d128811e6b089baeb63d to your computer and use it in GitHub Desktop.
Save DrIOSX/0fbe87cb00e0d128811e6b089baeb63d to your computer and use it in GitHub Desktop.
Setup
#!/bin/bash
$DirPath = "C:\temp"
$DirPathCheck = Test-Path -Path $DirPath
If (!($DirPathCheck)) {
Try {
#If not present then create the dir
New-Item -ItemType Directory $DirPath -Force
}
Catch {
Write-Output 'The Directory'$DirPath'was not created.'
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment