Powershell: How do I update my code to use a different file type?

BobTheDestroyer@lemy.lol to Programming@beehaw.org – 4 points –

I have a script that duplicates a Word doc template and renames each using a csv file with a list of names. What would be the equivalent code if instead of a csv file I use a text file?

Import-csv ‘.\individuals2.csv’ | foreach-object {
	$newname = ‘2 ‘ + $_.name + '.docx’
	Copy-item '.\template.docx' $newname
}
10

You are viewing a single comment

It's just a Notepad text file.

The confusion is that CSV is also just a Notepad text file that uses Commas to Separate Values.

They are asking about what kind of values are in it.