Last active
August 29, 2015 14:04
-
-
Save hickey/b4a34dfe9b5f8759f2a8 to your computer and use it in GitHub Desktop.
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
$filepath = Read-Host "Please enter absolute path to file." | |
$filetest = Test-Path $filepath | |
if ("$filetest" -eq "True") { | |
Write-Host $filepath "present." | |
} else { | |
Write-Host $filepath "does not exist." | |
$Wish = Read-Host "Would you like to create this file - yes or no?" | |
if ("$Wish" -eq "yes") { | |
New-Item -ItemType file -Path $filepath -Force | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment