Hi,
You have to copy the items, not change the fullnames. And the '-Path' parameter doesn't accept an array.
$today = Get-Date -Format "MM-dd-yyyy"
$source = '\\server\Elucid\System Reporting\Maginus Reports\Chalgrove\Automated Reports\Current\'
$destination = '\\zoom-nas\Elucid\System Reporting\Maginus Reports\Chalgrove\Automated Reports\Current\'
Get-ChildItem -path $source | ForEach-Object{
$newname = $_.BaseName + $today +$_.Extension
Copy-Item -Path $_.FullName -Destination (Join-Path $destination $newname)
}
Best Regards,
Ian Xue
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.