the_quick Posted January 12, 2011 Posted January 12, 2011 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
Guest TheLibrarian Posted January 12, 2011 Posted January 12, 2011 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.
the_quick Posted January 12, 2011 Author Posted January 12, 2011 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
Guest TheLibrarian Posted January 12, 2011 Posted January 12, 2011 (edited) 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. Edited January 12, 2011 by TheLibrarian Copy and paste errors.
the_quick Posted January 12, 2011 Author Posted January 12, 2011 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?
Guest TheLibrarian Posted January 13, 2011 Posted January 13, 2011 Try adding the * at the end there. "Year 11/%%G/My settings/Application Data/Serif/application/*"
Guest TheLibrarian Posted January 13, 2011 Posted January 13, 2011 You are welcome, I'm glad I could help.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now