peter's tech notes
Peter A. Pirc's notes about technology
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
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment