Last active
June 11, 2021 14:53
-
-
Save DrIOSX/0fbe87cb00e0d128811e6b089baeb63d to your computer and use it in GitHub Desktop.
Setup
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
#!/bin/bash |
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
$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