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.
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
}
Yeah it's a pretty simple task and I'm interested in getting more familiar with PS.
Thanks but I'm getting a 'Cannot create a file when that file already exists.' error. I checked the path so I am certain it is correct.
Perhaps my directions were unclear. The Excel/CSV file has the new names and I want to use them to replace the default names for the PDF files.
I got rid of that task. Now it's just Task #1
Nevermind I got it!
So I'm new to all this. When I enter the first command with my csv file and doc file included, it just opens the word doc. Wasn't sure what I should do next.
Sorry I'm new to this. What exactly do I enter into Powershell for each step?
It does have to be a Word template. It has a bar graph and various texts.
It's just a Notepad text file.