|
From: <pi...@ot...> - 2004-08-20 05:30:37
|
On 19 Aug 2004 at 16:24, Guillermo Gutierrez wrote:
>
> Hello All,
> I am having trouble figuring out how to copy/cut/paste files through
> cpp. Is there some kind of "Copy()" function or similar? I want to
> copy an executable from one folder to another. All help is greatly
> appreciated. Guillermo Gutierrez Market Scan Information Systems
> Software Q.A. Supervisor (818) 575-2000 x2427
> ggu...@ma...
Windows API function that should do the trick:
#include <winbase.h>
BOOL CopyFile(
LPCTSTR lpExistingFileName, // pointer to name of an
existing file
LPCTSTR lpNewFileName, // pointer to filename to copy to
BOOL bFailIfExists // flag for operation if file exists
);
BOOL MoveFile(
LPCTSTR lpExistingFileName, // address of name of the
existing file
LPCTSTR lpNewFileName // address of new name for the file
);
BOOL MoveFileEx(
LPCTSTR lpExistingFileName, // address of name of the
existing file
LPCTSTR lpNewFileName, // address of new name for the file
DWORD dwFlags // flag to determine how to move file
);
|