I’m copying a folder with its content to another dir. like this:
Copy-Item -Path "C:\docs1\article-title-master" -Destination "C:\docs2\articles" -recurse -Force
Is it possible with 1 command also to rename folder article-title-master at -Destination? At -Destination only, not in -Path.
Thanks!
>Solution :
You can simply change the name of the folder in -Destination like this : (as you did in you exemple)
Copy-Item -Path "C:\docs1\article-title-master" -Destination "C:\docs2\articles\new-article-title" -Recurse -Force
The original folder name "article-title-master" will remain unchanged in the source path.