Create folders from CSV file with Powershell
Based on a CSV (comma seperated values) file you can populate a folder with subfolders from that CSV file. Just make a csv file with a new foldername on each line and save it. Use this script to create a subfolder from every line in the file.
1 2 3 4 5 6 7 8 9 |
# location where the subfolders will be created Set-Location c:\test # csv file with folder names $Folders = Import-Csv c:\scripts\folders.csv ForEach ($Folder in $Folders) { New-Item $Folder.name -itemtype directory } |
How would you alter this scrip to run on remote servers to create the folder structure.