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 ...
12th January 2011, 03:48 PM #1
How to copy to mutliple folders
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?
12th January 2011, 04:08 PM #2
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.
12th January 2011, 04:19 PM #3
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 Started copying...
FOR /D %%G IN ("Year 7"/*) DO (
xcopy "src" "Year 7/%%G" /E /Q
echo to: %%G
Thanks in advance
12th January 2011, 04:55 PM #4
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 04:59 PM.
Reason: Copy and paste errors.
12th January 2011, 05:34 PM #5
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
or directory name on the target
(F = file, D = directory)?
Is there a parameter I have missed?
13th January 2011, 10:12 AM #6
Try adding the * at the end there.
"Year 11/%%G/My settings/Application Data/Serif/application/*"
13th January 2011, 11:36 AM #7
Thanks mate, you are a star
13th January 2011, 11:40 AM #8
You are welcome, I'm glad I could help.
By reggiep in forum How do you do....it?
Last Post: 11th February 2011, 05:36 PM
By kennysarmy in forum Windows
Last Post: 2nd April 2009, 01:41 PM
By PrimaryTech in forum Windows
Last Post: 13th March 2009, 10:28 AM
By originofsymmetry in forum Scripts
Last Post: 2nd October 2007, 01:16 PM
By fooby in forum Windows
Last Post: 14th June 2006, 03:18 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)