if(embedStylesPrinted != true) {document.write('');}var embedStylesPrinted = true;var content = '
#Checks initially to see if the rootpath folder exits, if so, recursively checks through folders until one isn't found, in which case it is created
function checkfolders
{
if (test-path $rootpath\\$name)
{
if (test-path $rootpath\\$name\\$monthyear)
{
" $rootpath\\$name\\$monthyear folder exists"
if (test-path $rootpath\\$name\\$monthyear\\$date)
{
"$rootpath\\$name\\$monthyear\\$date folder exists"
}
else
{
"only $rootpath\\$name\\$monthyear exists"
new-item -path $rootpath\\$name\\$monthyear -name $date -type directory
}
}
else
{
"only $rootpath\\$name exists"
new-item -path $rootpath\\$name -name $monthyear -type directory
new-item -path $rootpath\\$name\\$monthyear -name $date -type directory
}
}
else
{
"no folders exist"
#Folder Creation - Creates Folder from $name
new-item -path $rootpath -name $name -type directory
#Then Creates a sub folder "Month Year"
new-item -path $rootpath\\$name -name $monthyear -type directory
#Then sub folder named "Date"
new-item -path $rootpath\\$name\\$monthyear -name $date -type directory
}
}