Postprocessing

<< Click to Display Table of Contents >>

Navigation:  Reference > Settings >

Postprocessing

Postprocessing allows certain commands or programs to be executed after files have been received. For example, Windows batch scripts (files with extension .bat) can be used for global post-processing of received files. Further links to Windows batch programming can be found in the FAQ under Useful Links.

 

Ref_PostProc

 

Process received files

If activated the application or script stated under Program will get executed with the parameters stated under Parameter. Any place holders will get replaced by the corrsponding values of the received files.

 

Program

Must contain the application or script to be executed. The following place holders can be used:

 

%p = Path to the incoming directory in which the received files are saved.

%d = Partner name as used in partner management.

 

Log no error if the specified file doesn't exists.

Before executing the post processing command !MC5 checks, if the file to be called exists. Depending on used placeholders this might not be the case. If the file doesn't exists and this option is enabled, no error will be logged. This is useful if a placeholder is used in the commands path or name and not the file doesn't exist for all partners.

 

Parameter

Can contain optional parameters for the application or script. The following place holders can be used:

 

%p = Path to the incoming directory in which the received files are saved.

%d = Partner name as used in partner management.

%n = Local file name of the received file.

%f = Local file name of the received file including full path.

 

For security reasons the file name can only be used as a parameter to prevent execution of received files.

 

Example

Program:        %p\cmd\processing.bat

Parameter:        %d %f

 

Upon receiving of files the batch file processing.bat, located in the sub fold cmd of the incoming directory will get called. Additionally the partner name and the file name including the full file path of the received file will be passed to the batch script, which in turn can use those parameters to e.g. copy the received file to another location, based on the partner from which it was received.

 

If the application/script  stated under Program isn't found processing continues without any error messages.