A file action defines a copy, move, or delete step that happens to Native ODBC temporary files after a load is run.
There are six different file action programs:

File Action

Description

copy all files

Copies all temporary files for the Load table (including the temporary data file) to another specified directory.

copy data files

Copies the Native ODBC Load table's temporary data file to another specified directory. It also enables a new file name to be specified.

delete all files

Deletes all temporary files for the Load table (including the temporary data file).

delete data files

Deletes the Native ODBC Load table's temporary data file.

move all files

Moves all temporary files for the Load table (including the temporary data file) to another specified directory.

move data files

Moves the Native ODBC Load table's temporary data file to another specified directory. It also enables a new file name to be specified.

A Load table may have more than one file action. File actions are processed in order, based on the action number.

Creating a File Action

To create a file action:

  1. Click the File Actions tab of the Load Table Properties window.
  2. Click Add new action and select After load from the Action Type drop-down list.
  3. Enter the Action Description.
  4. Select the Action Program from the drop-down list (see above for the options).
    • Enter the target directory name for action programs of copy... and move....
    • To copy data files and move data files, optionally enter the file's new name.
  5. Click Save (Update) Action.
  6. Repeat if necessary for additional file actions.
  7. Click OK.

File Action Example

The following example moves the Native ODBC Load data file to another directory and then deletes all temporary files.

The data file is not deleted as it has been moved prior to the delete action.

Sample move data file file action:

Sample delete all files file action:

  • No labels