Allow Numeration When an Empty Destination File Exists


Allow Numeration When an Empty Destination File Exists

Applies to: EFT 8.x and later

Summary

An EFT outbound transfer configured to Numerate matching destination files can fail when a zero-byte (0 KB) file with the same name already exists at the destination. By default, EFT's IgnoreZeroFiles advanced property is enabled. In this specific situation, that default behavior bypasses the configured smart-overwrite/numeration handling and the transfer can fail because the destination file already exists.

Symptoms

You might see an error similar to the following in the EFT log:

ERROR Common <> - CopyFile failed, couldn't open destination file:
C:\Destination\file.txt; (0x50 (80) The file exists.)

This can occur when all of the following are true:

  • The source file is larger than 0 KB.
  • A same-named destination file exists and is 0 KB.
  • The outbound transfer is configured to Numerate matching files.

Cause

IgnoreZeroFiles is an EFT ClientFTP advanced property. Its default value is true. When it is enabled and EFT finds a 0 KB destination file for a non-empty source file, EFT does not apply the normal smart-overwrite rule in this case. Consequently, the Numerate rule is not used and the transfer can fail with a file-exists error.

Resolution

Set IgnoreZeroFiles to false so EFT applies the configured smart-overwrite behavior, including Numerate, when a same-named 0 KB destination file exists.

Important: This is a global advanced property for EFT outbound ClientFTP transfers. Test the change in a non-production environment first and schedule an appropriate maintenance window before changing it.

  1. Back up AdvancedProperties.json.
  2. Open AdvancedProperties.json in the EFT ProgramData folder. For example: C:\ProgramData\Globalscape\EFT Server Enterprise\AdvancedProperties.json.
  3. Add the following name/value pair. If the file already contains other properties, retain valid JSON syntax and separate entries with commas.
    {
      "IgnoreZeroFiles": false
    }
  4. Save the file.
  5. Restart the EFT Server service.
  6. Repeat the transfer with a non-empty source file and a same-named 0 KB destination file. EFT should apply the transfer's Numerate rule rather than fail because the original destination name exists.

To Restore the Default Behavior

Remove the IgnoreZeroFiles entry, or set it to true, then restart the EFT Server service.

Related Information

For general instructions and precautions when editing advanced properties, see Advanced Properties.