If you add -Force
to your command it will overwrite the existing files and you won’t see the error.
-Recurse
will replace all items within each folder and all subfolders.
Copy-Item "C:\realFolder\*" "C:\realFolder_new" -Recurse -Force
If you add -Force
to your command it will overwrite the existing files and you won’t see the error.
-Recurse
will replace all items within each folder and all subfolders.
Copy-Item "C:\realFolder\*" "C:\realFolder_new" -Recurse -Force