Windows Vista Forums

Re: copying a subfolder hierarchy to n folders, preserving rights

  1. #1


    Peter Schneider Guest

    Re: copying a subfolder hierarchy to n folders, preserving rights

    You could use xcopy or the better robocopy ?

    greetings, Peter Schneider

    "Uwe Ziegenhagen" <newsgroup@newsgroup> schrieb im Newsbeitrag
    news:Z_Cdnb4IYcEut1fXRVn_vwA@newsgroup

    > Hello,
    >
    > I have a template folder containing several folders with various acess
    > limitation, let's call it C:\template
    >
    > I have n folders in D:\ where I need to copy all subfolders from the
    > template to, preserving the original access rights.
    >
    > Is the following sufficient? I cannot test it at the moment. :-(
    >
    > $a = gci d:\
    > foreach ($folder in $a){
    > copy-item c:\template\* $folder\
    > }
    >
    >
    >
    > Thanks,
    >
    >
    > Uwe



      My System SpecsSystem Spec

  2. #2


    Uwe Ziegenhagen Guest

    Re: copying a subfolder hierarchy to n folders, preserving rights

    Peter Schneider schrieb:

    >
    > You could use xcopy or the better robocopy ?
    >
    > greetings, Peter Schneider
    >
    > "Uwe Ziegenhagen" <newsgroup@newsgroup> schrieb im Newsbeitrag
    > news:Z_Cdnb4IYcEut1fXRVn_vwA@newsgroup

    >> Hello,
    >>
    >> I have a template folder containing several folders with various acess
    >> limitation, let's call it C:\template
    >>
    >> I have n folders in D:\ where I need to copy all subfolders from the
    >> template to, preserving the original access rights.
    >>
    >> Is the following sufficient? I cannot test it at the moment. :-(
    >>
    >> $a = gci d:\
    >> foreach ($folder in $a){
    >> copy-item c:\template\* $folder\
    >> }
    >>
    >>
    >>
    >> Thanks,
    >>
    >>
    >> Uwe
    >
    Hi Peter,

    that worked. I had hoped for a solution with pure Powershell but xcopy
    is a much better choice.

    Uwe

      My System SpecsSystem Spec

Re: copying a subfolder hierarchy to n folders, preserving rights

Similar Threads
Thread Thread Starter Forum Replies Last Post
subfolder WITHIN Deleted folders disappeared Dominic Vista mail 9 22 Mar 2010
Shared folders - guest mixes up folder hierarchy after save /restore Andreas Ziegler Virtual PC 2 12 Oct 2009
Shared Folders - new files in subfolder not visible CRJpn Vista networking & sharing 1 19 Mar 2009
Rights to Folders Anne Vista account administration 1 26 Sep 2008
How to recover rights to folders x64FFFF Vista file management 3 18 Jul 2008