KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Hi I'm struggling mightily with the following - suppose I have the following directory structure C:\Temp\Test1 and C:\Temp\Test2 What I'd like to do is recursively copy the child-contents of C:\Temp\Test1 to C:\Temp\Test2 without copying the actual folder C:\Temp\Test1 ..right now if I use the command Copy-Item C:\Temp\Test1 C:\Temp\Test2 -Recurse Will result in C:\Temp\Test2\Test1 and no combination of parameters seems to alleviate the problem Similarly, when I wish to remove all the child content in C:\Temp\Test2 I wish to only delete the child content and not the actual folder eg Remove-Item C:\Temp\Test2\ -Recurse Is removing the \Test2 folder. I've tried so many variations of parameters - how can I accomplish what I am trying to do?
Tags (comma-separated)
Save Edits
Cancel