If you are using the Win32 API, consider CopyFile or CopyFileEx .
You can use the first one similar to the following:
CopyFile( szFilePath.c_str(), szCopyPath.c_str(), FALSE );
This will copy the file found in the szFilePath contents to the szFilePath contents and return FALSE if the copy was unsuccessful. To learn more about why the function failed, you can use the GetLastError() function and then look for error codes in the Microsoft documentation.
source share