Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Copy files with Pause/Resuming
Is possible copy files with Pause/Resuming like in QM?
I would at first try CopyFileEx. It allows you to pause/resume.
Can you show me an example?
Maybe some day later.
It can today be?
Sorry, no. This month I'm especially busy.
It can today be?
Lucas Wrote:It can today be?
try doing the code yourself while waiting 8) i will read up on what he said and give you some pointers 8)
Smile 8)
Copy      Help
str sfrom sto

sfrom="\\GINTARAS\F\1830_usa_ddk.iso" ;;236 MB

;cop sfrom sto

int canceled
;if(!CopyFileEx(sfrom sto &CFE_Progress 0 &canceled COPY_FILE_RESTARTABLE))
if(!CopyFileEx(sfrom sto 0 0 &canceled COPY_FILE_RESTARTABLE))
,;out canceled
,end _s.dllerror

;CopyFileEx supports resuming, but then it is much slower.
;I tested on 100Mbs network. Speed was (% of network speed):
;;;cop - 85%.
;;;CopyFileEx without COPY_FILE_RESTARTABLE - 85%.
;;;CopyFileEx with COPY_FILE_RESTARTABLE - 33%.

;CopyFileEx itself does not show a progress dialog.
;If eg network connection is lost while copying, CopyFileEx
;fails and leaves partially copied file. When calling next time,
;it resumes copying.

I thought that it would be more useful...

Forum Jump:

Users browsing this thread: 1 Guest(s)