Sybux
asked on
copy-item : create source folder in destination
Hi,
I'm trying to make a very simple copy of a folder from one location to another location like this :
copy-item -path r:\bob -Destination p:\bob
Problem is that copy-item create a bob subfolder in the destination so that I'm getting this :
p:\Bob\bob ?!!?
What the hell is the command to avoid this ?
Thx in advance
I'm trying to make a very simple copy of a folder from one location to another location like this :
copy-item -path r:\bob -Destination p:\bob
Problem is that copy-item create a bob subfolder in the destination so that I'm getting this :
p:\Bob\bob ?!!?
What the hell is the command to avoid this ?
Thx in advance
ASKER
because time to time, destination name is not original name :) It should be too easy
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Try..
copy-item -path "r:\bob\" -Destination p:\bob -Force -Recurse
ASKER
get-ChildItem was the tip. Thanks
Copy-item -path r:\bob -Destination P:\ -Recurse -Force