Running Batch Script to Rename File Incoming File in JSCAPE
Adeptia provides a java utility (in a zip file) to append the file with sender ID and the time stamp for generating unique files. The zip contains the batch file that can be executed to rename the incoming file name.
To run the utility to rename the incoming files in JSCAPE:
- Extract the utility zip folder.
- Place the extracted folder in the JSCAPE default installation directory.
- Go to JSCAPE Web Interface > Domains > Triggers.
- Create a trigger with "File Upload" as criteria.
- Select Run Process Action for the Trigger Action.
- Provide the name and absolute path of the batch file located in the extracted folder placed in the JSCAPE default installation directory.
- This batch requires two arguments as input. Provide the arguments separated by space in the "Arguments" field of the Trigger action. The first argument will be - %LocalPath% this is a variable that holds the filename along with its complete path. The second argument is the target location where the file would be placed upon renaming.
- Provide the location for the output stream generated by the batch file in the Output Stream text box.
- Provide the location for the Error stream generated by the batch file in the Error Stream text box.
- Click OK.
- Click Apply to apply the changes in the trigger.