|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.