I know how to copy the files all though one window but would like to break up the routine to be more efficient.
Code: Select all
For i = 0 to 9
Copy 60i*.xls to Destination
Next i
John
Code: Select all
For i = 0 to 9
Copy 60i*.xls to Destination
Next i
Code: Select all
Copy0.bat
Copy1.bat
.....
Copy9.bat
Code: Select all
Copy 600*.xls to Destination
Code: Select all
Copy 601*.xls to Destination
HansV wrote:I'm not sure what you mean by "a new window" here and why a new window would be more efficient...
The batch file equivalent of your loop would be
for /L %%i in (0,1,9) do copy "c:\sourcefolder\60%%i*.xls" "c:\targetfolder\"
Perhaps you could write a (looping) batch file that creates the 100 'sub' batch files, and then runs them?jstevens wrote:I currently have 10 main batch files and it appears that I may just have to end up with 100 of them.
I'm still not really clear about the conditions for which you are doing the copies, and the range of possible filenames.jstevens wrote:I am using RoboCopy (XP version) and just copying those files that have changed. Unfortunately there are a few series with 99 files. My thought was to process these with in groups of 10 such as in 6011*.xls, 6012*.xls and 6013*.xls.
Code: Select all
set source="C:\source"
set target="D:\target"
set parms=601*.xls /copyall /s /np /r:0 /w:0
robocopy %source% %target% %parms% > C:\somewhere\robolog.txt
Code: Select all
for /l %%a in (0,1,9) do (
start "" robocopy c:\source d:\target 601%%a*.xls^
/copyall /s /np /r:0 /w:0 /log:c:\somewhere\robolog%%a.log
)
I tested your code and it appears to be doing what I would like with one exception. I removed the "/np" thinking I would be able to display the % of file being copied in each window but the window only displays the name of the log file.John Gray wrote:
If you wanted to create one RoboCopy for each of the above series, I would do something like....