Batch File Processing

You can now archive a batch of primary or secondary files, instead of archiving individual files. You can either create a batch file on your own or use the application to create the batch file for you.

Archiver can now take a input which lists all the primary or secondary files. These files are separated by a delimiter "|"

Each line of this batch input file is treated as an individual input of primary or secondary files.

The syntax of each line in batch input file:

  1. When correlationType is Primary

    <Path to EDI file>|<Path to DTL file>|<Job ID (Optional)>|<Description>
  2. When correlationType is Secondary

    <Path of file to archive>|<Job ID (Mandatory)>|<Description>

After successful running of the Archiver, a results file is generated with name <batch input file>_result.txt which describes the status of each file archival line by line.

The syntax of each line in the result file:

  1. When correlationType is Primary

    <Line No.>|<Path to EDI file>|<Status( 0 - failed, 1 - success)>|<Error message(in case of failure)>
  2. When correlationType is Secondary

    <Line No.>|<Path of file to archive>|<Status( 0 - failed, 1 - success)>|<Error message(in case of failure)>
Note: Batch Input files are either for primary archival or secondary archival. Both of them cannot be clubbed together.
java -Dcom.foresightcorp.archiver.config=“configuration_dir” -jar “jarfile”
-batch “batch_input_file_path” -resultDir “resultdirectory” -logdir “logdirectory”

Parameter

Description

jar_file

(required) Path and filename for Archiver.jar. Directory is typically Foresight Archive and Retrieval System’s Java directory.

configuration_dir

(required) Directory where the various configuration files for Foresight Archive and Retrieval System reside. This is typically Foresight Archive and Retrieval System’s Bin directory.

batch_input_file_path

(optional) Path to batch input file which lists the files to be archived.

-batch "C:\Data\batchInputFile1.txt"

resultdirectory

(optional) Path to the directory where result file output is generated. Default path is where Archiver .jar file is located.

-resultDir "C:\Data\results"

logdirectory

(optional) Path to a directory to hold Foresight Archive and Retrieval System log files. Default is the Bin\logs directory.

Example (run on one line):

java -Dcom.foresightcorp.archiver.config="C:\TIBCO\Archiver\5.5\Bin"
-jar "C:\Foresight\Archiver\5.5\Java\Archiver.jar"
-batch "C:\EDI\batchInput.txt"
-resultDir "C:\EDI\Results"