Thursday, 22 August 2013

Powershell: Create Folder/Directory if doesn't exists

Simple script for creating new folders.

# Create folder if it doesn't exists
function CreteFolder([String]$folderPath)
{
if ((Test-Path $folderPath) -ne $True)
        { New-Item $folderPath -type directory }
}

No comments:

Post a Comment