Created
January 6, 2019 13:38
-
-
Save szemmali/7cd2fee9f3563bc4b2078335db98ca62 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
function vcollect-check-folder ($dir) { | |
$dateF = Get-Date -UFormat "%d-%b-%Y_%H-%M-%S" | |
if(!(Test-Path -Path $report$dir )){ | |
New-Item -ItemType directory -Path t$dir | |
Write-Host "New Storage folder created" -f Magenta | |
New-Item -Path $report$dir -Name $dateF -ItemType "directory" | |
Write-Host "New Work folder created" -f Magenta | |
} | |
else{ | |
Write-Host "Storage Folder already exists" -f Green | |
New-Item -Path $report$dir -Name $dateF -ItemType "directory" | |
Write-Host "New Work folder created" -f Magenta | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment