Skip to content

Instantly share code, notes, and snippets.

View szemmali's full-sized avatar
:octocat:

Saddam ZEMMALI szemmali

:octocat:
View GitHub Profile
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