Skip to content

Instantly share code, notes, and snippets.

@alexinnes
Last active August 29, 2015 14:22
Show Gist options
  • Save alexinnes/04354f4af99c9e80f3fe to your computer and use it in GitHub Desktop.
Save alexinnes/04354f4af99c9e80f3fe to your computer and use it in GitHub Desktop.
Create pages from CSV
#specify the content here
$content = gc "content path here"
#Have a list of what the files will be called specified here
$port = import-csv "list path here"
#loops through the list, creating pages and adding the content
foreach($i in $port){
Add-Content "C:\eco\export\$($i.Title)" $content -force
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment