Files uploaded using WinSCP are being moved with .filepart extension


THE INFORMATION IN THIS ARTICLE APPLIES TO:

  • EFT, v7.0 and later

SYMPTOM

In a File Uploaded Event Rule, files that are uploaded using WinSCP are being moved with a .filepart extension.

WORKAROUND

Disable the feature in WinSCP

WinSCP has a setting enabled by default that transfers files larger than 100kb to a temporary file name (with the .filepart extension) and then renames the file. The original file transfer is being recognized as an upload and it’s moving the file before WinSCP has a chance to rename the file. The easiest fix is to disable this feature in WinSCP.

The feature can be disabled in WinSCP:

  1. Click Options > Preferences.
  2. In the Preferences dialog box, click to expand the Transfer node, then click Endurance.
  3. Under Enable transfer resume/transfer to temporary filename for, click Disable.
  4. Click OK to save the changes.

Folder Monitor Event Rule Scenario 1: Detect Rename

Normally, you could just put a conditional in the File Upload rule to ignore .filepart file types, but since WinSCP renames the file, it won’t treat that as an upload. Instead of disabling WinSCP, you could create a Folder Monitor Event Rule to detect when the file is renamed. 

The rule below will trigger on any files added (excluding .filepart) or renamed (to catch files larger than 100kb that are renamed by the software). The important thing to note is that the variable name for the rename conditional must be changed to %.FS.DST_FILE_NAME% (Destination file name, or in other words, the renamed file). Here’s how the rule should look:

Folder Monitor Event Rule Scenario 2: Sweep

This will be the same setup as the rule above, but you will remove the rename step. In the Folder Monitor options, you can configure the option for Scan for files every… X Minutes. This would check every set amount of time you have configured to see if there are files that have not been moved. This will only work if you want everything moved in the user’s folder. The option is highlighted here: