It's the - in line 19, it's showing up when I paste to a file as — and causing an issue.
Change line 19 to:
Write-Host "Skipping '$($_.Name)' already exists in $baseFolder"
Once I did that with your script, it ran fine.