🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #9892

Re: SHFileOperation - Question

#9892
From: Bob Gonder
Date: Thu, 03 Jun 2004 00:00
32 lines
2260 bytes
Andrue Cope wrote:

>On Wed, 2 Jun 2004 12:51:29 +0200, Tommy wrote:
>
> TBH this isn't very difficult
>but I wouldn't bother if you're only after "a few flashing lights and
>things to amuse the users".

Yes, it is rather easy, use....

CopyFileEx( pathF, newpathT, CopyProgressRoutine, pathF, &Canceled,
COPY_FILE_FAIL_IF_EXISTS );

>Actually predicting time to completion is tricky and the best you can do is
>keep revising your estimate. Even then you need to build in a delay or
>"aggregation factor" simply to produce reasonable values.

Once I've copied a couple files, (MB/sec is tricky when MB is small)
the rest copy in the desginated time (pretty close).  As you say, the
estimate is recalculated regularly.

> Microsoft dodn't
>appear to have bothered with this and that might be why the estimates it
>gives (using SHFileOperation AFAIK) have more comedy value than accuracy :)

Too true, plus the propensity to quit copying midway through a
directory, so you start over from the beginning, but there is no "No
To All" button, so you say "Yes To All" even though you really _don't_
want to overwrite stuff that was there before you started the copy the
first time.............................
Those are the reasons I wrote my own, and discovered the joys of 
CopyFileEx.
Technical Details
Message-ID: <kmpsb01vcrfboa8ehn7s2dev7tkubfljf8@4ax.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <40bdb13e@newsgroups.borland.com> <1m1nvj6lbffpw.ufpbxtniolsi.dlg@40tude.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,acf999c4e1362fc6
X-Google-Attributes: gid10cc67,public
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: SHFileOperation - Question
Date: Wed, 02 Jun 2004 17:00:04 -0700
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <kmpsb01vcrfboa8ehn7s2dev7tkubfljf8@4ax.com>
References: <40bdb13e@newsgroups.borland.com> <1m1nvj6lbffpw.ufpbxtniolsi.dlg@40tude.net>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 69.69.99.167
X-Trace: newsgroups.borland.com 1086220807 69.69.99.167 (2 Jun 2004 17:00:07 -0700)
Lines: 34
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail