I have a script below to copy a file into another folder multiple times. I have a csv file with 3 names, and it’s suppose to copy the file 3 times, but it’s only copying it one time. How would I make it copy more than one time?
$csv_location = '\\arg-fs2\users\tantony\PowerShell\Outlook email signature\employees_info.csv' $html_files_location = '\\arg-fs2\users\tantony\PowerShell\Outlook email signature\User Outlook Signatures' $master_html_file = '\\arg-fs2\users\tantony\PowerShell\Outlook email signature\htmlCodeMaster.txt' $read_csv = Import-Csv -Path $csv_location foreach ($employees in $read_csv) { Remove-Item $html_files_location\* -Force $txt_file_names = ($employees.Name) + ".txt" Copy-Item -Path $master_html_file -Destination $html_files_location\$txt_file_names }