OfficeDev/PnP — pull request #229 by cbpeters (2014-11-04 16:02:31+00:00)
Title: Added an AddFolder commandlet to create sub folders

I've written a powershell script to bulk upload files to SharePoint but Add-SPOFile doesn't automatically create the folder if it doesn't exist, so I wrote Add-SPOFolder to take care of this.

Here's the PowerShell where I use these two together for reference.

```powershell
$path = "$dir\Main\Files"
$excludeList = @()
Get-ChildItem -Path $path -Recurse | % {
$pathParts = $.FullName.substring($pwd.path.Length + 1).split("\");
if ( ! ($excludeList | where { $pathParts -like $ } ) ) {
$folder = $.FullName.Replace($path+"\", "").Replace("\"+$.Name, "").Replace("\", "/")
if ($.GetType().Name -eq "DirectoryInfo") {
Add-SPOFolder -Name $.Name -Folder $folder
}
if ($.GetType().Name -eq "FileInfo") {
Add-SPOFile -Path $.FullName -Folder $folder
}
}
}