IF (lnRetval = 1 AND lnBytesRead = 0) OR (lnRetval = 0) EXIT ENDIFInternetReadFile() may return 0 even thought it read data sucessfully, and wwiptstuff will stop reading file and assume it is sucess.
IF (lnRetVal = 1 AND lnBytesRead = 0) *** Done EXIT ENDIF IF lnRetVal = 0 THIS.nError = GetLastError() THIS.cErrorMsg = THIS.GetSystemErrorMsg() =FCLOSE(lhFileHandle) ERASE (lcTargetFile) EXIT ENDIFand also check the size of the file on remote server and the one downloaded to local disk. If both of them are same, then I "assume" the transmission is succesffuly otherwise failed.