+ Post New Thread
Results 1 to 4 of 4
How do you do....it? Thread, Copy Multiple Sub-Folders in Technical; So, a load of our students have just sat an exam, and I want to copy a specific sub-folder out ...
  1. #1
    enjay's Avatar
    Join Date
    Apr 2007
    Location
    Reading, Berkshire, UK
    Posts
    4,490
    Thank Post
    282
    Thanked 196 Times in 167 Posts
    Rep Power
    76

    Copy Multiple Sub-Folders

    So, a load of our students have just sat an exam, and I want to copy a specific sub-folder out of each of their My Documents folders. The folder path is \\SERVER\Users\Exams\Name\Exam-XXXX-Work (where XXXX is their candidate number). Can anyone suggest a script which would trawl the "Exams" folder and copy all the Exam-XXXX-Work folders out into one folder, so I can burn them to disc? There's nearly 200 students, so I don't really fancy doing this manually...

  2. #2


    Join Date
    Mar 2009
    Location
    Leeds
    Posts
    6,815
    Thank Post
    231
    Thanked 888 Times in 763 Posts
    Rep Power
    301
    might be quicker to just sit ona pc that can access the parent folder and search then copy the results to where they are needed

  3. Thanks to sted from:

    enjay (17th January 2014)

  4. #3

    jinnantonnixx's Avatar
    Join Date
    Mar 2011
    Location
    In the Calamatorium.
    Posts
    2,028
    Thank Post
    120
    Thanked 513 Times in 347 Posts
    Blog Entries
    2
    Rep Power
    288
    I've tried this Powershell on a basic test and it seems to work.
    Code:
    Get-ChildItem -Path "\\SERVER\Users\Exams" -Recurse | where {{$_.PSIsContainer} -and {{$_.Name -like "exams-*"} -and {$_.name -like "*-work"}}} | Copy-Item  -Destination "c:\temp" -Force -Recurse
    Last edited by jinnantonnixx; 17th January 2014 at 10:58 AM. Reason: Updated - had a bug

  5. #4
    enjay's Avatar
    Join Date
    Apr 2007
    Location
    Reading, Berkshire, UK
    Posts
    4,490
    Thank Post
    282
    Thanked 196 Times in 167 Posts
    Rep Power
    76
    Quote Originally Posted by sted View Post
    might be quicker to just sit ona pc that can access the parent folder and search then copy the results to where they are needed
    Of course. I didn't think about copying from a search results list. Sometimes it is the simple answers which evade us, isn't it. Thanks!

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 2
    Last Post: 28th November 2013, 10:24 AM
  2. Replies: 22
    Last Post: 15th June 2010, 08:16 AM
  3. Replies: 1
    Last Post: 2nd July 2008, 04:20 PM
  4. Replies: 2
    Last Post: 17th April 2008, 11:25 AM
  5. win2k3 share sub-folder missing security tab
    By torledo in forum Windows
    Replies: 9
    Last Post: 8th January 2008, 08:09 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •