Windows Thread, Script to copy files en mass from folder to folder in Technical; Can anyone help me with a batch script to copy some files from folder to folder en masse?
We have ...
25th April 2012, 10:41 AM #1
Script to copy files en mass from folder to folder
Can anyone help me with a batch script to copy some files from folder to folder en masse?
We have a 2 root folders. The first is called "ControlledTests" and in that folder we have 150 home folders called "control01" - "control150". The 2nd root folder is called "HistoryTests" and in that folder we have 150 home folders called "History001" - "History150". What I want to achieve is to copy the contents of each "ControlledTests" home folder in to the respective "HistoryTests" home folder. So:
Contents of "control01" copied in to "History001"
Contents of "control02" copied in to "History002"
Contents of "control03" copied in to "History003"
Contents of "control04" copied in to "History004"
Any help is very much appreciated!
25th April 2012, 10:57 AM #2
Use robocopy or this
If your still on XP / 2003 you will need to install this on the machine you are doing the action: http://www.microsoft.com/download/en...ng=en&id=15326
robcoopy "C:\Source" "C:\Destination" /MIR
Last edited by FN-GM; 25th April 2012 at 10:58 AM.
25th April 2012, 11:13 AM #3
I don't think robocopy will do the rename of the directories. I can't think of an easy way to do the leading zero's in a batch file - although you can probably look at this thread and figure something out. When I have something like this that is a one off, I tend to use excel to generate the data I need and use the concatenate function too produce a single column containing the final commands I want. It's not particularly re-usable but I can complete the task in a few minutes so it's reasonably efficient for one off's.
25th April 2012, 12:26 PM #4
Sorry didnt notice that. Yo shoud use the rename command then setup the commands for every folder in Excel. I did this last month.
By dahhunter in forum Scripts
Last Post: 17th September 2009, 11:52 PM
By timbo343 in forum Scripts
Last Post: 18th February 2008, 10:43 PM
By Dos_Box in forum Learning Network Manager
Last Post: 12th April 2007, 11:42 AM
By Frazer in forum Scripts
Last Post: 20th June 2006, 04:53 PM
By browolf in forum Scripts
Last Post: 28th November 2005, 11:28 AM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)