Guest User

Untitled

a guest
Jan 10th, 2020
1,225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Run Powershell as administrator
  2. # Enter CD "NEW FOLDERS DIRECTORY HERE"
  3. # Run this .ps1 by entering the following: & "ENTER FILE LOCATION OF SCRIPT HERE"
  4. # Click Enter
  5.  
  6. $Folders = Import-Csv "CSV LOCATION GOES HERE"
  7.  
  8. ForEach ($Folder in $Folders) {
  9.  
  10. $folderName = ($Folder.Title + " (" + $Folder.Year + ") ")
  11.  
  12. $folderName = $folderName -replace '_*(\[.*?\]|\(.*?\))_*' -replace '_+', ' ' -replace ':', ' ' -replace '"', "" -replace ',', " "
  13.  
  14. New-Item -Name ($folderName) -type directory
  15. }
Advertisement
Add Comment
Please, Sign In to add comment