1. Home
  2. Troubleshooting
  3. File Size Tolerances

File Size Tolerances

When I transfer a file to or from an FTP server, is the file size after transfer the same as the file size before transfer?
Not necessarily.  FTP servers typically support two transfer modes, ASCII and BINARY.

In BINARY mode, the file size always stays the same.  Files that have been encrypted (without ascii-armoring) and executable files are examples of binary files.  These files should always be transferred in BINARY mode to prevent data corruption. 

In ASCII mode, the file size may differ when the file is transferred between systems with different operating systems.  For example, when a file is sent from an FTP server on a UNIX system to a Windows system, the line feed characters would be replaced with a carriage return plus a line feed character.  So, the file might increase in size.  In the opposite case, when a file is sent from an FTP server on a Windows system to a UNIX system, the carriage returns would be eliminated and the line feeds would remain. Thus, the file would decrease in size.

How does Diplomat MFT decide if a file has successfully transferred?
After the file transfer has completed, Diplomat MFT compares the size of the source file before transfer to the size of the destination file after the transfer.

For files transferred in BINARY mode, the source and destination file sizes must match exactly.  If they do not match, Diplomat MFT automatically retries the file transfer and rechecks the before and after file sizes.  If they still do not match after 2 retries, Diplomat Managed File Transfer fails the job.  If the job fails, the destination file(s) or partial file(s) are deleted.  Source file(s) are not deleted. Failure email and other notifications are sent.

For files transferred in ACSII mode, the source and destination file sizes may be different. If the destination files size is NOT within 10% of the source file size, Diplomat MFT automatically retries the file transfer and compares the source and destination file sizes.  After up to 2 retries, Diplomat Managed File Transfer proceeds as follows:

  • If source and destination file sizes match exactly, Diplomat MFT assumes that the file was transferred correctly and the job continues.  If no other errors are found, Diplomat MFT treats the job as a ‘SUCCESS’. 
  • If the file sizes do not match exactly but the destination file size is within 10% of the source file size, Diplomat MFT assumes that the file was transferred correctly and the job continues. If no other errors are found, Diplomat MFT treats the job as a ‘SUCCESS’.  A non-fatal error message noting the file size difference is entered in the log and any notifications generated for the job. Success emails and other notifications are sent.
  • If the destination files size is NOT within 10% of the source file size, Diplomat MFT assumes that the file transfer may have had a problem, but the job continues.  If no other errors are found, Diplomat MFT treats the job as a ‘WARNING’.  A non-fatal error message noting the file size difference is entered in the log and any email notifications generated for the job. Warning emails and other notifications are sent.

What happens if Diplomat MFT cannot determine the size of a file?
Typically, retrieving file sizes from files on the local network is not a problem.  However, some FTP servers do not support the SIZE command.  If an FTP server does not support the SIZE command, Diplomat MFT cannot determine the SIZE of the file while it is on the FTP server.  If no other errors are found, Diplomat MFT treats the job as a ‘WARNING’.  Warning emails and other notifications are sent.

Does Diplomat MFT support any of the algorithms used by some FTP servers and clients for ‘file integrity checking’?
Yes. These algorithms work by using an algorithm to calculate a unique checksum based on the contents of the file. Using a checksum for file integrity check is available when Diplomat Managed File Transfer sends files to or from a Diplomat Cloud Connector site.

Can file integrity checking be disabled?
Yes. A file integrity checking parameter is available for both source and destination partner profiles.  When"None" is selected, no file integrity checking is done during the the transfer job.

Updated on February 19, 2020

Was this article helpful?

Related Articles