+ Post New Thread
Results 1 to 8 of 8
Windows Server 2000/2003 Thread, How to copy to mutliple folders in Technical; Hi guys I hope that some one can help me, Need to copy some resources (a folder) to multiple users ...
  1. #1
    kcymer's Avatar
    Join Date
    Nov 2007
    Posts
    149
    Thank Post
    4
    Thanked 9 Times in 8 Posts
    Rep Power
    15

    How to copy to mutliple folders

    Hi guys

    I hope that some one can help me,

    Need to copy some resources (a folder) to multiple users docs - to application data folder.
    Would like to avoid coping it one by one to each user, is there a tool that can do kind of mass copy to many folders at once?

    I seen xcopy command but it beats me to get the right parameters

    Putting those resources to shared, will not work as user can not point program to that.
    Can anyone help?

    Cheers

  2. #2
    TheLibrarian
    Guest
    Before anyone can help you will need to be more specific (at least anyone who is going to supply a command line fix).

    Please provide a dummy source path that that roughly matches your source path (remove server name if it's a UNC), also does the source contain folders that need to be copied across.
    Please provide a dummy destination path and whether all user directories under that folder should get the documents.

    XCOPY on its own won't be able to do this for you, you will have to use a FOR loop round the XCOPY command.

  3. #3
    kcymer's Avatar
    Join Date
    Nov 2007
    Posts
    149
    Thank Post
    4
    Thanked 9 Times in 8 Posts
    Rep Power
    15
    Thanks for responce

    I have a folder in main directory of H drive -folder is called "test" and contains few subfolders, the path to copy to is \year 11\user_name\My settings\Application Data\Serif\application\

    I have something like this left behind by some one who use to work for us, but not sure how to tweak it. And maybe there is other tool that can be used for this?
    This is old batch file:
    @echo off
    echo Started copying...
    FOR /D %%G IN ("Year 7"/*) DO (
    xcopy "src" "Year 7/%%G" /E /Q
    echo to: %%G
    )
    echo Done.
    pause

    Thanks in advance

  4. #4
    TheLibrarian
    Guest
    Right from the look of that the script has to be run from the folder above the "Year 7" folder or it's not going to work, or more accurately the "Year 11" folder after the modifications.

    The rest seems to be in order, you need to modify the "Year 7/%%G" part to read "Year 11/%%G/My settings/Application Data/Serif/application/". You will also need to modify ("Year 7"/*) to ("Year 11"/*).

    Personally I hate using / instead of \ in paths, but the command shell doesn't seem to care overly much unless you try to use auto complete.

    Because testing is everything : I suggest you narrow down the wildcard in the for statement so that it only matches one or two destination folders in case there is anything wrong that I haven't spotted.
    Last edited by TheLibrarian; 12th January 2011 at 03:59 PM. Reason: Copy and paste errors.

  5. #5
    kcymer's Avatar
    Join Date
    Nov 2007
    Posts
    149
    Thank Post
    4
    Thanked 9 Times in 8 Posts
    Rep Power
    15
    Thx Librarian for quick reply
    I see now that %%G act as a wild card here, still got a bit of problem. Message when I try to run this batch file:
    Does Year 7/user_name/My Settings/Application Data/Serif/application/ specify a file
    name
    or directory name on the target
    (F = file, D = directory)?

    Is there a parameter I have missed?

  6. #6
    TheLibrarian
    Guest
    Try adding the * at the end there.

    "Year 11/%%G/My settings/Application Data/Serif/application/*"

  7. #7
    kcymer's Avatar
    Join Date
    Nov 2007
    Posts
    149
    Thank Post
    4
    Thanked 9 Times in 8 Posts
    Rep Power
    15
    Thanks mate, you are a star

    Kris

  8. #8
    TheLibrarian
    Guest
    You are welcome, I'm glad I could help.

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 4
    Last Post: 11th February 2011, 04:36 PM
  2. copy only certain file types between folders..
    By kennysarmy in forum Windows
    Replies: 3
    Last Post: 2nd April 2009, 12:41 PM
  3. Batch copy files and folders up one level
    By PrimaryTech in forum Windows
    Replies: 0
    Last Post: 13th March 2009, 09:28 AM
  4. Mass Copy of Files and Folders
    By originofsymmetry in forum Scripts
    Replies: 6
    Last Post: 2nd October 2007, 12:16 PM
  5. Copy a file to many destination folders.
    By fooby in forum Windows
    Replies: 1
    Last Post: 14th June 2006, 02:18 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
  •