You cannot change the size of a standard array in PowerShell. You can instantiate a new array by using the + operator to do what you are trying to do with the copyto method.
$path2 = @(“C:\Users\spate\Documents\SampleFile17.txt”)
$folder2 + $path2
Having said that in your post you said, [quote quote=291502]Copy content of one file to another file[/quote]
None of this has to do with the content of a file only an array of strings containing a PATH to a file NOT it’s contents. To do that you will need to use some cmdlets let Get-Content and Add-Content
$path2 = “C:\Users\spate\Documents\SampleFile17.txt”
Add-Content -Path $path2 -Value (Get-Content -Path $folder2)
See Get-Help Add-Content and Get-Help about_arrays