I'm using the function Movefile() (in C). I can see the file moved from the source folder to the destination (means the MoveFile success) but when I do GetLastError() I get error no. 2 (ERROR_FILE_NOT_FOUND).
What can be the problem?
The code is:
_snprintf(szSrcPath, MAX_PATH, "%s/%s/%s.jpg", NPath, imagePathFromAdmin, username);
_snprintf(szDestPath, MAX_PATH, "%s/Images/Storage/%s/%d/%s.jpg", NPath, domain, sub_folder, username);
strcpy(imagePathStorgae,szDestPath);
MoveFile(szSrcPath,szDestPath);
err=GetLastError();