CSM 10.4 Documentation

Home

Create a Temporary File

Use the Temporary Filename Token to create a temporary file for a Write to a File Action or an Excel Merge Action in a One-Step™ Action.

Use temporary files to create files that do not need a particular name and to avoid overwriting the same file multiple times. Temporary files can be deleted after the One-Step Action is finished executing.

To create a Temporary File:

  1. In a Write to a File Action in a One-Step Action, right-click in the Filename text box.
  2. Click Filenames>New Filename.
  3. Define properties for the temporary file:
    • Name: Provide a name for the temporary file (example: Report). This is the name that appears in the Token menu under Filenames so that it can be used in other One-Step Actions. This name is for reference only; it is not the actual name of the file. It is given a unique name (example: tmp001) wherever it is stored (temporarily or persistently) on a computer. The Sample area in the Filename Properties window shows what the actual name might look like (with or without the full path).
    • Filename Includes a Full Path: Select this check box to include the full path to the User’s temporary directory (example: C:\Users\firstname.lastname\AppData\Local\Temp\tmp0001.TMP). Clear the check box to use only the filename (example: tmp0001.TMP).
      Note: In the figure, the temporary file (tmp0001.TMP) is being created in the current User’s working directory. To specify a particular directory, provide it before the name you specified for the file. You can also clear the Filename Includes a Full Path check box and specify the full path in the Filename text box of the Write to a File Action.
    • Delete File after One-Step Action Process is Complete: Select this check box to delete the temporary file after the One-Step Action finishes executing. Clear this check box to have the file persist. Include a full path so that CSM can find the location of the file to delete it.
    • Use Custom Extension: Select this check box to define a custom extension. Then, provide the extension.
      Note: By default, temporary files have a TMP extension. However, if you are creating a specific type of file, such as a text file (TXT) or a Rich Text Format (RTF) file, consider using an appropriate extension so that other programs know how to handle the file.
  4. Select OK.

    The filename is shown in the Token menu under Filenames and can be used again for other One-Step Actions.


Was this article useful?