Trading Networks 10.3 | Administering and Monitoring B2B Transactions | Managing File Transfers with ActiveTransfer | Managing Events | Executing File Operations | Copying or Moving Files
 
Copying or Moving Files
After you create a basic file copy or move action as described in Creating a Basic File Operation Action, use this procedure to set the properties of the action.
*To set the properties of a file copy or move action
1. In the Source Filter box, enter the name of the file whose transfer will trigger this event. By default, ActiveTransfer Server considers all files.
Note:
You can use wildcard characters to filter the file names. For example, enter *.zip to trigger the event only when zip files are uploaded or downloaded. To trigger an event based on a name string in the zip files, use the name string in the Source Filter box, preceded and followed by wildcard characters. For example, enter *invoice*.zip to trigger the event based on the file URLs, when zip files containing the character string invoice in their file names are uploaded or downloaded. If you define a Source Filter for an action, the action acts only on the files that are filtered out.
For information on the use of wildcards in ActiveTransfer Server, see Use of Special Characters in Search.
2. If you want to use regular expression in the source filter, specify a valid regular expression in Source Filter and select Use regular expression.
Examples for regular expressions:
(.(?!purchaseorder))*
Excludes files with the file URL containing purchaseorder
.*/out/.*
Include files with the file URL containing the folder out
^abc(.*)123$
Includes anything that starts with abc and ends with 123. Matches abc123, abcxyz123, but not abcxyz123def
NEW-((*.doc)|(*_backup_*))
Includes anything starting with NEW- that either ends in .doc, or is followed by the string _backup_
3. Select the Destination URL to which the file will be copied or moved by doing one of the following:
Important:
When you enter file path locations, be sure to end the path with a slash character (“/”) to identify the location as a folder and not a file.
*If the destination URL is on your local machine or network, select File Path and browse to or enter the location.
Note:
To specify a file URL for a shared location, use the following syntax: FILE:////<host>/SharedFolder/. Make sure that the OS user running the ActiveTransfer Server instance has full access to the shared location.
*If the destination URL is on a remote machine or network, select Remote File Path and browse to or enter the location in the format: protocol://<host>:<port>/DestinationFolder/
*If the destination URL is a virtual folder in the ActiveTransfer VFS, do the following:
1. Select Virtual Folder
2. Type in the virtual folder details in the text box or use the browse option.
If you use the browse button, the Select virtual folder look up window opens.
3. In the Select virtual folder window, select the virtual folder by highlighting the element and click on Select.
4. If you want to point to a subfolder in the virtual folder, append the URL in the text box with the details of the subfolder.
Note:
The virtual folder specified here should be configured on the same ActiveTransfer Server instance on which the event is configured.
Tip:
If you want to connect to a remote server using a secure protocol (FTPES, FTPS, HTTPS or SFTP) and want to configure authentication using secure key exchange, create a virtual folder for the remote server in the VFS and configure the Keystore, Keystore Password, and Key Password parameters. You can then use the Virtual folder that you configured in the Virtual Folder option of the File Path in the event action. For additional details see Associating a Virtual Folder with a Physical Folder Location.
4. If File URL is a third-party HTTP(S) server, clear the ActiveTransfer HTTP(S) Serverselection and do the following:
Note:
This field appears only if the File URL specified is an HTTP(S) URL and is not a server variable. For more information on how ActiveTransfer handles remote or external HTTP(S) servers, see Connecting to HTTP(S) Servers.
a. In Request Method, select either POST or PUT HTTP request method.
b. In the Request Headers table, add any additional headers and values to use for the HTTP request method in the respective text boxes.
For information on the header information specific to chunking (Transfer-Encoding=chunked) and multipart messages (Content-Type= multipart/form-data), see Connecting to HTTP(S) Servers.
5. Select Create Directory to enable ActiveTransfer to create the destination folder if the folder specified in Destination URL is not present.
If Destination URL path does not include a folder, ActiveTransfer copies or moves the file directly to the specified directory path.
6. Type a User Name and Password for the remote system.
7. If you want to route file transfers to remote servers through a proxy server, select the appropriate proxy server options:
a. Select Use Proxy.
b. Select one of these options:
*Global proxy settings. If you want ActiveTransfer to use the default proxy server alias set up in Integration Server or ActiveTransfer.
*Select proxy alias. If you want to use a specific proxy server alias for the event. Then select the appropriate proxy server alias to use from the available list.
8. To check the connection to the remote server with or without a proxy server, click Test Connection.
9. To assign partners for the event, do the following:
Note:
For virtual folders, use this option only if you want to override the partners configured for the virtual folders.
a. Select Assign partner.
b. Click in the text box and do one of the following:
*Select the partner to assign from the list of configured partners in ActiveTransfer.
*Type a parameterized value for the partner using the following format:
[partner_name],[remote_partner_name]
10. Select additional properties for the copy or move action as follows:
Select this option...
To...
Rename file to
Rename the file to the specified name.
Wait for
Wait for the specified number of seconds before starting the copy or move operation to ensure that an outside process is not writing to the file.
Give up after
Stop the copy or move operation if it does not complete within the specified number of seconds.
Retry [ ] times, at intervals of [ ] second(s)
Retry a failed copy or move operation for the specified number of times, at the interval specified in seconds.
Resume transfer from the point of interruption
Resume an interrupted copy or move operation from the point of interruption.
Preserve file modification date
Retain the time stamp indicating when the file was last modified.
Execute error action
Execute an error action if the file operation fails.
Execute asynchronously
Execute the file operation in a different thread so that it does not interfere with other actions.
11. If you are using FTP, FTPS, or FTPES protocols, configure the following additional settings:
*ASCII Transfer, to change the file transfer mode to ASCII.
*Simple Mode, to change the file transfer mode to simple mode. Select this option if you are transferring files to AS/400 systems.
*If you selected the ASCII mode, select the Convert Line Endings option for ActiveTransfer Server to change the line endings of the file. Select No Change if you do not want ActiveTransfer Server to alter the line endings.
ActiveTransfer Server uses the Binary file transfer mode as the default for Move and Copy actions.
12. Click Save.
13. If you selected the Execute error action check box, define an error action as described in Defining an Error Action.
14. If you are finished defining actions for this event, activate the event as described in Activating an Event.
Result:
A “copy” action copies all the files passed on from the previous action to the location specified in Destination URL. However, the files copied to the specified destination will not be available to the subsequent action for processing. The list of files in the source location is passed on to the subsequent action.
A “move” action moves all the files passed on from the previous action to the location specified in Destination URL. The files are removed from the source folder. The list of files in the destination location is passed on to the subsequent action.
Example: An event configured with the following actions:
1. Find action: Find files in File URL = <source folder>
2. Encrypt action: Encrypt the files
3. Move Action: Moves the files to the destination URL = <destination folder>
The event results in the following:
1. Find action lists all the files in the <source folder>.
2. Encrypt action encrypts all the files listed by the find action.
3. Move action moves the files that are encrypted by the encrypt action to the <destination folder>.