DOS-How to selective recurse folders to copy

July 19, 2011 at 09:14:37
Specs: Windows 7
In a directory we have 50+ and growing folders.
I need to copy the latest DB file from each folder.
I am using the below script
for /R %source% %%f in (*.bak) do xcopy /Y /Z %%f %dest% /D:%month%-%day%-%year%

but due to the size of the dbs, the copy process takes a long time (nearly 6 hours) as each file is queued for copying.

We have some folders that are named as
1. PDM_State1, PDM_state2 and likewise
2. PIDM_state1, PIDM_State2 and liekwise
3. Repo_State1, Repo_State2 and ...
4. Stag_State1, Stag_State2 ....
5. CEUser, Load, LoadW.

Is there any other way that we can speed up or split the recursive action across different set of folders and have multiple batch files?

Any help is appreciated. Thanks in advance.

See More: DOS-How to selective recurse folders to copy

Report •

July 20, 2011 at 11:45:02
If the source drive and destination drive are the same then it will probably take longer because of more head seeks.

Report •

July 27, 2011 at 06:19:18
They are in different systems. How can we filter the recursive options on selective folders ?

Report •

Related Solutions

Ask Question