The .filepart Challenge

Many of today's problems are often caused by solutions to old challenges, and the '.filepart' use case is no exception. While one could argue that temporary file names are no longer required in today's MFT landscape, it remains a very common use case that businesses encounter.

What is a Temporary File Name?

A temporary file name is usually a combination of a file name with an appended value. The appended value can vary, but common examples include: .filepart, .part, and .temp. The purpose of a temporary file name is to indicate that a file is not complete.

Why would a File be Transferred with a Temporary File Name?

Before the invention of Managed File Transfer (MFT), determining if a file transfer had completed successfully was a significant challenge. If a file transfer failed, it was common for the partially uploaded file to remain available on the server, leading to issues such as dealing with corrupted files or files missing key information. Using a temporary file name, like myFile.txt.filepart, businesses could ensure that files were only processed after a successful transfer by renaming them to their original names.

This Sounds Like the Perfect Solution - What is the Problem?

The reason temporary file names and extensions are still used today is because they were an effective way to indicate a completed file transfer. However, with the introduction of Managed File Transfer (MFT), complications began to arise. Event-driven architecture allowed automation to process files, but temporary file names caused conflicts, leading to automation failures and errors like 'Unexpected exception storing the file.'

Event Driven Architecture

MFT's event-driven architecture allows automation to be triggered after any file transfer event. For instance, a 'new file event' is triggered when a file is uploaded to the MFT server, enabling immediate processing.

Complications with Temporary File Names

When a file is uploaded with a temporary name (e.g., myFile.txt.filepart), the new file event automation is triggered, but once the file is renamed (removing the temporary extension), the automation can break, causing errors. The renaming process interferes with the automation, leading to conflicts.

A Large Number of Temporary File Name Formats

While formats like .filepart are common, senders may generate unique extensions for every file transfer. This variety makes it difficult for MFT systems to consistently and accurately process temporary files, adding complexity to the MFT environment.

How do MFTs Deal with Temporary File Extensions Today?

Handling temporary file names remains a challenge for MFT systems, despite advances. Some solutions include asking the sender to stop using temporary file names or introducing file polling on the MFT server.

The Best Solutions I Have Found to Date

There are a few best practice solutions that avoid overhead or file polling. These include defining a new file event trigger with an ignore policy and defining a rename event trigger to process files after renaming.

Step 1: Define a New File Event Trigger with an Ignore Policy

Configure your MFT system to ignore known temporary file extensions during the event configuration. This way, files without temporary extensions are processed immediately, while temporary files are ignored until they are renamed.

Step 2: Define a Rename Event Trigger

Configure a rename event trigger so that when a file is renamed, the same automation as the new file event is triggered. This ensures that files are processed only after renaming, applying the same ignore policy for temporary extensions.

Example Workflow

For example, if the sender uploads test_file_01.txt.filepart to your MFT server, no new file event is triggered due to the ignore policy. Once the file is renamed, the rename trigger kicks in, and the file is processed by the automated workflow.

Uploading the File to a Temporary Location

Another solution is to upload the file to a temporary directory without new file event triggers. The sender can use any temporary file name, and once the file is renamed and moved to the target folder, it can be processed.

Summary

Temporary file names continue to exist in the MFT world, and while MFT systems do not always provide out-of-the-box support for them, there are practical solutions available to handle this challenge effectively.