Article View: borland.public.cppbuilder.nativeapi
Article #14977Re: easy copy?
From: Rodolfo Frino
Date: Thu, 24 Jul 2003 13:31
Date: Thu, 24 Jul 2003 13:31
23 lines
1800 bytes
1800 bytes
The easy way is to use the CopyFile API function. For example
if ( !CopyFile( (PathExisting + File).c_str(),
(PathDest + File).c_str(),
FALSE ))
{
GetLastError();
// Display error message if needed (CopyFile failed)
}
Rodolfo
"Robert Hoover" <not.a.real.address@anywhere...sorry> wrote in message
news:3f1fdd9e@newsgroups.borland.com...
> Is there an easy way to copy a file? I'm really pulling my hair out over
> this one! I've found rename, mkdir, etc. but no copy. How can I write a
> program to mimic what I can do in explorer, ie, right-click and copy,
> right-click and paste in another folder?
>
> Thanks,
> Rob
>
>
Technical Details
Message-ID:
<3f1fdfbc@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer2.atl.newshosting.com!216.166.71.118.MISMATCH!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<3f1fdd9e@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,2f4b8343b4cae53f X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-07-24 06:40:06 PST From: "Rodolfo Frino" <rodolfofrino@yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3f1fdd9e@newsgroups.borland.com> Subject: Re: easy copy? Date: Thu, 24 Jul 2003 23:31:39 +1000 Lines: 25 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 203.206.27.2 Message-ID: <3f1fdfbc@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1059053500 203.206.27.2 (24 Jul 2003 06:31:40 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer2.atl.newshosting.com!216.166.71.118.MISMATCH!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail