1. File copy problem

I have written a Windows app which backs up data 
over a lan to a CD burner. This works fine, using
createDirectory() and copyFile() in Win32Lib.

The files are large (~50 megs), so it would be nice 
to have a progress bar to show how far along the 
job has gone. 

Question: how to find out how much has been copied,
so I can set the progress bars? Do I need to start a 
separate program to monitor this?

BTW: I tried using a Euphoria routine to copy the 
files, but it's just too slow.

Regards,
Irv

new topic     » topic index » view message » categorize

2. Re: File copy problem

Hi Irv,
the short answer is that you need to use the API function called CopyFileEx
instead on the simple
copyFile() routine in win32lib. This API function uses a call-back routine, that
you write, that
enables you to update a progress bar or the like.

Let us know if you want any more help with that.
-----
Derek.

31/01/2002 10:31:58 AM, Irv Mullins <irvm at ellijay.com> wrote:

>
>I have written a Windows app which backs up data 
>over a lan to a CD burner. This works fine, using
>createDirectory() and copyFile() in Win32Lib.
>
>The files are large (~50 megs), so it would be nice 
>to have a progress bar to show how far along the 
>job has gone. 
>
>Question: how to find out how much has been copied,
>so I can set the progress bars? Do I need to start a 
>separate program to monitor this?
>
>BTW: I tried using a Euphoria routine to copy the 
>files, but it's just too slow.
>
>Regards,
>Irv
>
>
>
>
---------
Cheers,
Derek PArnell

new topic     » goto parent     » topic index » view message » categorize

3. Re: File copy problem

On Wednesday 30 January 2002 06:47 pm, you wrote:
>
> Hi Irv,
> the short answer is that you need to use the API function called CopyFileEx
> instead on the simple copyFile() routine in win32lib. This API function
> uses a call-back routine, that you write, that enables you to update a
> progress bar or the like.
>
> Let us know if you want any more help with that.

Some of the info I have found on CopyFileEx() states that 
this routine is only available on NT, not Win 98 or 95.
Do you know if this is true? I don't want to spend time 
trying to decipher those structures just to find out it 
won't work anyway.

Thanks,
Irv

new topic     » goto parent     » topic index » view message » categorize

4. Re: File copy problem

> > Hi Irv,
> > the short answer is that you need to use the API function called CopyFileEx
> > instead on the simple copyFile() routine in win32lib. This API function
> > uses a call-back routine, that you write, that enables you to update a
> > progress bar or the like.
> >
> > Let us know if you want any more help with that.
> 
> Some of the info I have found on CopyFileEx() states that 
> this routine is only available on NT, not Win 98 or 95.
> Do you know if this is true? I don't want to spend time 
> trying to decipher those structures just to find out it 
> won't work anyway.

Header file winbase.h :

#if(_WIN32_WINNT >= 0x0400)
//
// Define possible return codes from the CopyFileEx callback routine
//

    Martin

new topic     » goto parent     » topic index » view message » categorize

5. Re: File copy problem

On Thursday 31 January 2002 10:52 am, you wrote:

> Irv:
>   My MSDN library says function supported on NT4 and above;
>   Its NOT supported in Windows.
> Bernie

Thanks, Bernie.
You saved me a headache. If this were Linux, I would just 
open a new program which would watch the output file and periodically 
update a progressbar display with the current size. I don't know 
if that's possible in Windows.

Regards,
Irv

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu