Quantcast
Channel: TechNet Blogs
Viewing all articles
Browse latest Browse all 34890

PowerTip: Use PowerShell to Copy Items and Retain Folder Structure

$
0
0

Summary: Copy items in a folder and retain the container with Windows PowerShell 3.0.

Hey, Scripting Guy! Question How can I use Windows PowerShell 3.0 to copy a folder structure from a drive to a network share, and retain the original structure?

Hey, Scripting Guy! Answer Use the Copy-Item cmdlet and specify the –Container switched parameter:

Copy-Item c:\fso –destination \\server1\share -recurse -container


Viewing all articles
Browse latest Browse all 34890

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>