Powershell: Folders and Subfolders
I had prepare a network share with folders and subfolders, and I wasn’t going to do it the manual way ;). That’s when PowerShell comes in and saves the day. Check out the video below for details on the script.
$Folder=”\\bjtechsvr\Public\”
$archs = “x86”
$OSs = “Vostro 220″,”Vostro 220s”,”Vostro 230″,”Latitude D630″,”Latitude 630″,”Vostro 200″
$Makes = “USB”,”Network”,”Display”,”Audio”,”Media”
foreach ($arch in $archs)
{
foreach ($OS in $OSs)
{
foreach ($make in $Makes)
{
New-Item -path “$Folder\$OS $arch” -Name “$Make” -Type directory
}#close $make loop
}#close $OS loop
}#close $arch loop
Leave a Reply