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 }
}
Posted by Petrov plac at 08:36 0 comments
Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest
Labels: powershell, utility
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Contact me at

linkedin
twitter
4pi.si

Interesting

Web development - toolbox
Offical page of Four PI.si

Blog Archive

  • ►  2020 (2)
    • ►  February (2)
  • ►  2019 (2)
    • ►  November (1)
    • ►  February (1)
  • ►  2016 (1)
    • ►  November (1)
  • ►  2015 (4)
    • ►  May (1)
    • ►  March (2)
    • ►  January (1)
  • ►  2014 (3)
    • ►  May (2)
    • ►  April (1)
  • ▼  2013 (3)
    • ▼  August (1)
      • Powershell: Create Folder/Directory if doesn't exists
    • ►  July (1)
    • ►  April (1)
  • ►  2012 (9)
    • ►  September (1)
    • ►  August (1)
    • ►  July (3)
    • ►  April (2)
    • ►  January (2)
  • ►  2011 (13)
    • ►  October (2)
    • ►  September (3)
    • ►  July (3)
    • ►  June (2)
    • ►  March (1)
    • ►  January (2)
  • ►  2010 (8)
    • ►  November (1)
    • ►  October (4)
    • ►  September (2)
    • ►  July (1)

Search This Blog

About Me

Petrov plac
View my complete profile
Simple theme. Theme images by enot-poloskun. Powered by Blogger.