Hi All,
It would be great help if any one will provide the BAT solution.
We have a requirement to create clones of .tif images and created batch folders which contains 10 images and each batch will be copied to the destination drive (z:\) for every 5 minutes.
Ex:
Source folder: Destination Drive
C:\Batch1 (10 .tiff images) Z:\
C:\Batch2 (10 .tiff images) Z:\
C:\Batch3 (10 .tiff images) Z:\
. Z:\
. .
.
etc..
After every 5 minutes each batch(10 images) will be copied into destination folder z:\ drive.
Thanks in advance.
Regards,
Venred
Urgent - Copy Batch of 10 files to dst folder every 5 min
Moderator: DosItHelp
Re: Urgent - Copy Batch of 10 files to dst folder every 5 mi
It would be really helpfull for me, if anyone will through light on this please.
-
- Expert
- Posts: 391
- Joined: 19 Mar 2009 08:47
- Location: Iowa
Re: Urgent - Copy Batch of 10 files to dst folder every 5 mi
Something like this?
*untested*
*untested*
Code: Select all
@echo off
cd /d c:\
:loop
cls
echo Copying files from batch* folders to z:\
for /d %%a in (batch*) do copy "%%a\*.*" z:\
::wait 5 minutes
echo Wait 5 minutes
ping -n 300 -w 999 127.0.0.1 >nul 2>nul
goto :loop
Re: Urgent - Copy Batch of 10 files to dst folder every 5 mi
HI Larry,
Thanks you very much for the reply.
Could you please provide enhanced code as it is copying all the files repeately every 5 minutes?
For ex: Each batch contains 10 files, Batch 1, Batch 2, Batch 3. All 30 files are copying every five minutes.
Here the requirement is after every 5 minutes one batch will be copied to the destination folder z:\
Could you please through some light?
Thanks in advance.
Regards,
Venred
Thanks you very much for the reply.
Could you please provide enhanced code as it is copying all the files repeately every 5 minutes?
For ex: Each batch contains 10 files, Batch 1, Batch 2, Batch 3. All 30 files are copying every five minutes.
Here the requirement is after every 5 minutes one batch will be copied to the destination folder z:\
Could you please through some light?
Thanks in advance.
Regards,
Venred
-
- Expert
- Posts: 391
- Joined: 19 Mar 2009 08:47
- Location: Iowa
Re: Urgent - Copy Batch of 10 files to dst folder every 5 mi
You mean you want one of the batches copied each 5 minutes, and then looped?
Try this:
Try this:
Code: Select all
@echo off
cd /d c:\
:loop
cls
echo Copying files from batch* folders to z:\
for /d %%a in (batch*) do (
time /t
echo Copying %%a now . . .
copy "%%a\*.*" z:\
time /t
echo Wait 5 minutes
ping -n 300 -w 999 127.0.0.1 >nul 2>nul
)
goto :loop
Re: Urgent - Copy Batch of 10 files to dst folder every 5 mi
Hi Larry,
Millions of thanks for this.
Regards,
Venred
Millions of thanks for this.
Regards,
Venred