Home > Back-end >  MoveFile move files
MoveFile move files

Time:09-25

I use multithreading download the documents from the many links above (400), and open 10 threads in thread pool, to download to the cache directory, use the MoveFile API function with mobile the downloaded file to another folder in the directory, and the results after some folders to the target folder, in the original directory and it should have been the original directory file is to the target directory, to solve is how to return a responsibility?
If (MoveFile (file_old, file_new))
{
Move the log (" ok ")
}
MoveFile return value is zero, true;
So log printing is OK, but the result unsatisfactory, strives for the building!

CodePudding user response:

Threads should write cache file is also not close the file, the MoveFile function copy task has been completed,

CodePudding user response:

Find the reason, because the download links there are repeated

CodePudding user response:

refer to the second floor wy530247936 response:
find the reason, because the download links there are repeated


This reason is accidental, file download task seems to set up a list of download links, and repetitive exclude or very be necessary!

CodePudding user response:

  • Related