Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In an MFC application, what's the easiest way to copy a file from one directory to another?

Should I create two CFile objects and copy one into the other character by character? Or is there something in the library that will do this for me?

like image 326
Tommy Herbert Avatar asked Oct 10 '08 15:10

Tommy Herbert


1 Answers

I would just use the CopyFile Win32 API function, but the example code in the CFile::Open documentation shows how to copy files with CFile (using pretty much the method you suggest).

like image 178
jeffm Avatar answered Oct 25 '22 03:10

jeffm