Create a folder structure based on the contents of a text file.

Change "t:\groups" for the 'root' of your file creation.

Change "t:\folders.csv" to your csv file.

Make sure your csv file as a column header called Name ... ie

Name
Dir1
Dir2
Dir3
Dir4

It's a really basic script but hopefully good for newbies similar to myself! The import-csv will create an array, you reference the item with $Folder.Name

 

PowerShell
Edit|Remove
Set-Location "t:\groups" 
 
$Folders = Import-Csv T:\folder.csv
 
ForEach ($Folder in $Folders) {
 
New-Item $Folder.Name -type directory
}