Setting a temporary file location for FME to use via the FME_TEMP environment variable

Liz Sanderson
Liz Sanderson
  • Updated

Question

What is the FME_TEMP environment variable?
 

Answer

FME_TEMP

FME puts many temporary files in the system temporary directory, which on some Windows versions defaults to C:\temp or under the user's local temp directory (i.e., C:\Users\mark\AppData\Local\Temp). If there is not enough room in this directory due to space limitations on the C:\ drive, you can override this default and send the FME temporary files to a different directory using the FME_TEMP environment variable.  The FME_TEMP environment variable can be used for both FME Form (formerly FME Desktop) as well as FME Flow (formerly FME Server) using the steps below.

Windows

Control Panel > System and Security > System > Advanced System Settings> Environment Variables

FME searches for a temp directory using the following tests in order:

  1. If the user environment variable FME_TEMP exists, use its value as the temporary directory path.
  2. If the user environment variable TEMP exists, use its value as the temporary directory path.
  3. If a directory called \temp exists on the drive on which FME is running, use that directory.
  4. If a directory called \tmp exists on the drive on which FME is running, use that directory.


If all of these tests fail to locate an existing temporary directory, FME ends with an error message indicating that it couldn't open a temporary file.

To remedy this situation, either:
Create an <FMEdrive>:\temp or <FMEdrive>:\tmp directory (where <FMEdrive> is the drive on which FME is running).

OR

Define the FME_TEMP or TEMP user environment variable, either system-wide or for the user account on which FME is running. For example, if the temporary files are to be placed into the directory j:\scratch then the environment variable FME_TEMP would be set to j:\scratch before FME is run.

Some operating systems default to a RAM drive for the temp drive. This means that FME caching may consume RAM, which can affect performance. Setting FME_TEMP will force FME to cache to a physical drive, which may improve performance.

If using the FME_TEMP environment variable to change the temporary system folder for FME Flow, please be sure to set FME_TEMP in the system environment variables and not the user environment variables.  It is also recommended that you restart FME Flow in order to have the changes take effect.

FME Workbench creates temporary mapping files in the directory pointed to by the TEMP environment variable if set. Otherwise, C:\temp is used.

Linux

On LINUX platforms such as Ubuntu, you'd set the environment variable in /etc/environment, e.g.

FME_TEMP=/<temp folder>


To set FME_TEMP differently for each user, FME_TEMP can be set in ~/.profile
This will take precedence over the path set in /etc/environment.

If FME_TEMP is set in ~/.bashrc like
export FME_TEMP=/<temp folder then that will only affect FME translations run from the console or Workbench if started from the console.

To apply the change to FME Workbench when started from the menu, set FME_TEMP in /etc/environment or ~/.profile

 

SAIF Format and Temporary Files

If anyone is using the SAIF format, this format behaves differently (for historical reasons). SAIF also uses temporary files as it reads/writes, but that module uses the environment variables in the following order: 

  • STK_TMPDIR
  • TMPDIR

to figure out what temporary directories the SAIF writer/reader will use.

Note: SAIF has been deprecated as of FME 2023.0, for more information, please see FME Deprecations.

 

FME Flow

FME Flow will also make use of the FME_TEMP directory for temp files created during a translation, but please note that this does not affect files used before or after a translation, like uploaded files, data download results, or data streaming results. These temporary files are kept in the FME Flow system share.

The default path on Windows is:

C:\ProgramData\Safe Software\FME Flow\resources\system\temp

And on Linux:

/opt/fmeflow/resources/system/temp


Performance Tuning with FME_TEMP

Many of the FME temporary files are created when caching data for larger datasets or for display in FME. Using a faster hard drive can make quite a difference to the FME translation if disc cache I/O speeds are improved. An example would be if you have an SSD (Solid State Drive) on your computer. These are typically quite a bit faster than traditional HHD drives, so if you can point your FME_TEMP to an SSD then you'll see a bit of a performance increase when working with larger datasets. More on performance tuning at Performance Tuning FME
 

Purging Temp Files

For more information, see Why did the temporary files not get deleted from my translation?

Was this article helpful?

We're sorry to hear that.

Please tell us why.

As of January 14th, 2026, comments on knowledge base articles have been closed. To make sure questions don’t get missed and to enable more community support, we’ve moved discussions to the FME Community. If you have a question or a comment about this article, please create a new post or create a support ticket.