locked
Copying files with GPP - does it copy subfolders? RRS feed

  • Question

  • I am looking at the files extension in preferences to copy some files from a UNC share at boot. The folder also contains subfolders which I would also like tocopy down. For example the UNC share is \\server\files and under the files share is a number of subfolders and files in the root. If I use * it copies does the files in the root of \\server\files but the subfolders are not copied. Is there someway to also copy the subfolders?
    Thursday, April 23, 2009 12:05 PM

Answers

  • Hi,

     

    Thanks for the post.

     

    From your description, I understand that you would like to also copy the subfolders at the same time.

     

    As we know, The “Source file(s)” field just support single character (?) and multiple character (*) wildcards, allowing you to copy or modify multiple files. We cannot copy the subfolders at the same time. Thank for your understanding.

     

    In this case, we could use the following methods to copy the subfolders

     

    Method 1: Use the BAT file to deploy it:

    ==========================

    We could use the Xcopy /s command to copy directories and subdirectories.

     

    For more information about Xcopy, please refer to the following article:

    http://technet.microsoft.com/en-us/library/bb491035.aspx

     

     

    Method 2: Use the VBscript file to deploy it:

    ==============================

    We could use the CopyFolder method to make it.

     

    For more information about CopyFolder method, please refer to the following article:

    http://www.microsoft.com/technet/scriptcenter/guide/sas_scr_klwf.mspx?mfr=true

     

    After that, let’s assign a Computer Startup Script to make it.

     

    http://technet.microsoft.com/en-us/library/cc754995.aspx

     

    Hope this helps.

    • Marked as answer by Miles Zhang Monday, April 27, 2009 12:46 AM
    Friday, April 24, 2009 10:15 AM

All replies

  • Hi,

     

    Thanks for the post.

     

    From your description, I understand that you would like to also copy the subfolders at the same time.

     

    As we know, The “Source file(s)” field just support single character (?) and multiple character (*) wildcards, allowing you to copy or modify multiple files. We cannot copy the subfolders at the same time. Thank for your understanding.

     

    In this case, we could use the following methods to copy the subfolders

     

    Method 1: Use the BAT file to deploy it:

    ==========================

    We could use the Xcopy /s command to copy directories and subdirectories.

     

    For more information about Xcopy, please refer to the following article:

    http://technet.microsoft.com/en-us/library/bb491035.aspx

     

     

    Method 2: Use the VBscript file to deploy it:

    ==============================

    We could use the CopyFolder method to make it.

     

    For more information about CopyFolder method, please refer to the following article:

    http://www.microsoft.com/technet/scriptcenter/guide/sas_scr_klwf.mspx?mfr=true

     

    After that, let’s assign a Computer Startup Script to make it.

     

    http://technet.microsoft.com/en-us/library/cc754995.aspx

     

    Hope this helps.

    • Marked as answer by Miles Zhang Monday, April 27, 2009 12:46 AM
    Friday, April 24, 2009 10:15 AM
  • Hi, hopefully this thread is stil alive, as it's the closest one to my issue that I've found.

    XCOPY command will work fine IF you want to copy the same folder set to everyone, but I need to use Item Level Targetting (ILT) in order to only run certain (Logon script) commands for certain users.

    Option 1 is to create multiple GPs and use a WMI filter to only apply to certain users. ... Messy and complex... 

    Option 2 is to use the RUN registry key (under Preferences --> Windows Settings --> Registry) and call a specific XCOPY script depending on your location. Using ILT, we could import a number of different XCOPY commands into the GPP and then use the ILT filter to call the specific XCOPY command at Logon. Script A would go to Site A users, script B to Site B users and so on ...

    Neither of these options are particularly clean, and I was wondering if anyone had any other ideas on how best to do this.

    Mick

    Tuesday, August 3, 2010 8:23 AM