Configure Post Transfer Actions
A Post Transfer Action (PTA) is a program that is invoked on the server after a file has been successfully uploaded to the server.
To configure a Post Transfer Action
-
Go to Configuration > Post Transfer Actions .
-
Click Add to create a new PTA.
For information about configuring File filter , Program , and Arguments , refer to the dialog box help and the examples below.
-
Save your settings..
Examples
Use these examples as models for testing and configuring PTAs.
Example 1: Send a directory listing to the log file
This example sends a directory listing to the log file. The default file filter triggers the action after every upload. The program for these PTAs must be specified using the full path; in this example it is the path to the Windows cmd
command. The $FILE_PATH$
token is used to get the listing of the upload directory. Because the destination
directory might include spaces, this token is enclosed in double quotation marks.
File filter : .*
Program : C:\Windows\System32\cmd.exe
Arguments : /c dir "$FILE_PATH$"
Note
Use the /c
argument when you use the Windows cmd
command. This switch specifies that cmd
should exit after the specified command is carried out.
Example 2: Copy uploaded PDF documents to specified directory
This example copies uploaded PDF files to an existing destination directory. The file filter uses a regular expression to specify all files with a .pdf file extension.
File filter : .*\.pdf
Program : C:\Windows\System32\cmd.exe
Arguments : /c copy "$FULL_PATH$" c:\fxgout
Logging for Post Transfer Actions
Error messages and PTA output can be viewed in either the Windows Event Viewer or the server's debug (text) log file. Windows Event logging is enabled by default, but the default logging level in the Event Viewer does not include the PTA output; you need to increase the Event Viewer logging level to "Information" to see this content. Debug logging to a text file is not enabled by default. For working with PTAs, enabling debug logging to a text file is recommended.
To configure PTA logging to a debug (text) log file
-
From the Configuration tab, click Debug Logging .
-
Click Enable debug logging to log file . By default, this log is set to Information , which is sufficient to include PTA output and error messages.
You can click Custom to fine-tune the level of output that is sent to this log. Three settings control PTA output: LOG_I_PTA_ERROR, LOG_I_PTA_RESULT, and LOG_T_PTA.
-
Save your settings.
To view the text log file, open the console View menu, and select View Latest Debug Log File
More information