Type 2: Program after each input file
After BarcodeOCR has processed an input file, it starts a .bat script or an .exe application. The program receives the list of all output files created from the input file. This lets you further process several output files together.
You set up the interface in the Advanced step of the configuration, with the option Start the following application after each input file.
General
- BarcodeOCR calls the interface before the input file is deleted. It is the last step in processing the document. At this point, all documents have been saved in the output and error folders, and the application after each output file (Type 1) has been called for each output file.
- The parameters are passed in a fixed form. You cannot change the order or the names of the parameters.
- You can start
.batscripts or.exeapplications. - BarcodeOCR waits until the script has finished. Then it prepares the next file for saving.
- There is no timeout while waiting for the process.
The application runs in the security context of the BarcodeOCR service. So specify network access as a UNC path here as well. How to give the service access to network folders is described in Process network folders.
Parameters
| Parameter | Description | Sample values |
|---|---|---|
-source | Full path to the input file | "C:\Config\dec24748\Test\Testfile.pdf" |
-files | List of saved files with file name, recognized barcode and status | "INV_1.pdf","INV_1","True" |
Format of the file list
-files contains one entry for each saved file, with the file name, the barcode and whether the file was saved successfully.
- The values for one file are separated by a comma (
,). - The individual files are separated by a semicolon (
;).
Structure of a single entry:
"filename.pdf","BarcodeValue","Successfully processed?"
Example of one entry:
"ER-12345.pdf","ER-12345","True"
Example of a list with three files:
"ER-12345.pdf","ER-12345","True";"AR-12345.pdf","AR-12345","True";"Duplicate.pdf","","False"
Example of a parameter call
This form of passing the parameters cannot be changed.
-source="C:\Config\dec24748\Tour\test invoices.pdf" -files=""S-INV-PT-03757.pdf","INV-PT-03757","True";"S-INV-PT-03757_0.pdf","INV-PT-03757","True";"S-INV-PT-03757_1.pdf","INV-PT-03757","True";"S-INV-PT-03757_2.pdf","INV-PT-03757","True";"S-INV-PT-03757_3.pdf","INV-PT-03757","True";"S-INV-PT-03757_4.pdf","INV-PT-03757","True";"S-INV-PT-03757_5.pdf","INV-PT-03757","True";"S-INV-PT-03757_6.pdf","INV-PT-03757","True";"S-INV-PT-03757_7.pdf","INV-PT-03757","True";"S-INV-PT-03757_8.pdf","INV-PT-03757","True""