Article View: borland.public.cppbuilder.database.ado
Article #3648Re: Copying dBase Files
From: Vassiliev V.V.
Date: Wed, 24 Jul 2002 06:00
Date: Wed, 24 Jul 2002 06:00
64 lines
3364 bytes
3364 bytes
Use CopyFile from WinAPI. Regards, Vassiliev V.V. http://www.oledbdirect.com CopyFile The CopyFile function copies an existing file to a new file. The CopyFileEx function provides two additional capabilities. CopyFileEx can call a specified callback function each time a portion of the copy operation is completed, and CopyFileEx can be canceled during the copy operation. BOOL CopyFile( LPCTSTR lpExistingFileName, // name of an existing file LPCTSTR lpNewFileName, // name of new file BOOL bFailIfExists // operation if file exists ); Parameters lpExistingFileName [in] Pointer to a null-terminated string that specifies the name of an existing file. Windows NT/2000/XP: In the ANSI version of this function, the name is limited to MAX_PATH characters. To extend this limit to nearly 32,000 wide characters, call the Unicode version of the function and prepend "\\?\" to the path. For more information, see File Name Conventions. Windows 95/98/Me: This string must not exceed MAX_PATH characters. lpNewFileName [in] Pointer to a null-terminated string that specifies the name of the new file. Windows NT/2000/XP: In the ANSI version of this function, the name is limited to MAX_PATH characters. To extend this limit to nearly 32,000 wide characters, call the Unicode version of the function and prepend "\\?\" to the path. For more information, see File Name Conventions. Windows 95/98/Me: This string must not exceed MAX_PATH characters. bFailIfExists [in] Specifies how this operation is to proceed if a file of the same name as that specified by lpNewFileName already exists. If this parameter is TRUE and the new file already exists, the function fails. If this parameter is FALSE and the new file already exists, the function overwrites the existing file and succeeds. "Gary Gross" <garygross@adelphia.net> �������/�������� � �������� ���������: news:3d3dd777$1_1@dnews... > In an application I have a number of dBase files and their associated index > files. I want to copy those files intact into another directory (from > within the application) with no user interaction, as a part of a Backup > routine. > > I cannot seem to find a VCL command to Copy an entire file. I can Delete, > Pack, etc., but not Copy. > > What am I missing? > > Gary Gross > > >
Technical Details
Message-ID:
<3d3e42bb_2@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-06!sn-xit-04!supernews.com!news.maxwell.syr.edu!fr.usenet-edu.net!usenet-edu.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!dnewsReferences:
<3d3dd777$1_1@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 10698b,e76f2f504ba76bc5 X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2002-07-23 23:17:40 PST From: "Vassiliev V.V." <news@vassilievvv.mtu-net.ru> Newsgroups: borland.public.cppbuilder.database.ado References: <3d3dd777$1_1@dnews> Subject: Re: Copying dBase Files Date: Wed, 24 Jul 2002 10:00:42 +0400 Lines: 68 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 NNTP-Posting-Host: 62.118.135.186 Message-ID: <3d3e42bb_2@dnews> X-Trace: dnews 1027490491 62.118.135.186 (23 Jul 2002 23:01:31 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-06!sn-xit-04!supernews.com!news.maxwell.syr.edu!fr.usenet-edu.net!usenet-edu.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!dnews