Also I had someone help with a similar task of duplicating a Word file that is renamed from a list of names found in a csv file. What would be the code when a txt file is used?
Import-csv ‘.\individuals.csv’ | foreach-object {
$newname = ‘2’ + $_.name + '.docx’
Copy-item '.\_2023 Summary Page.docx' $newname
}
Thanks but PS closes so I assume it ran into an error. I'm not sure why because there is the same number of files and list items. I doublechecked to make sure.