I recently tried to copy several jpg image resources using the copyfile function in Win32 in a C ++ project. When I encountered a large image that was copied to only a small part of the content, I tried to copy another big image, there is only one part.
Inadvertently, we can see that the size of the two images to be copied is exactly 10 MB. Is it true that copyfile can only copy 10 MB of content at a time? There have been many tests, but the specific reasons are unclear.
Instead, use the process that runs a batch file for copying.
It has been useless for too long, and the related commands have been forgotten. After a while, I wrote them correctly, so I recorded them as follows:
Copy the file to the work Directory: xcopy "F: \ test \ 100.jpg"" F: \ work \ "/y/I. Note that the target path cannot contain a file name. The parent directory is the correct one.
Rename the file to ori: Rename "F: \ work \ 100.jpg"" ori.jpg ". Note that the new file name does not contain a path.