Share a copyfile usage problem and solutions.

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.