Naming
Specify the convention for naming documents.
Selection of the filename
Renaming options | Description | Typical example |
---|---|---|
Use original file name |
| A preprocess already renames the files. The original filename is kept. |
Use recognized barcode as the file name |
| The processed documents should be searchable by barcode value |
Additional renaming options
Renaming options | Description | Typical example |
---|---|---|
Add to the file name as a prefix |
| Every file should have a text or timestamp prepended, to enable chronologically sorted files by name inside of a file browser |
Add to the file name as a suffix |
| To relate the processed file to the original document, the original filename should be attached |
Replace characters in the file name that are invalid in NTFS with |
| The barcode value contains invalid characters, that are later used as a filename. Since a file with invalid characters can't be created on an NTFS file system, the file will be moved inside the error folder and named "Naming Error" |
Replace text in the output filename
Additionally, you can replace specific characters or strings in your barcode. Just enter the text that BarcodeOCR should file (i.e. INV-) and define, which text should be replaced. (i.e. INVOICE-).
You can choose placeholder or variables listed below if you need further customization. After entering the text to find and the text that should be replaced, choose "Add to list" to add the replacement to the list.
You can save different replacements to the list. They will be processed in the order of display. If you like to delete a replacement, click the entry and choose "Remove from list".
Samples:
Find | Replace with | Barcode text | After replacement |
---|---|---|---|
INV- | INVOUCE- | INV-12345 | INVOICE-12345 |
DATE | %TODAY% | SCAN-DATE | SCAN-01.01.16 |
Invoice | (leer) | Invoice5678 | 5678 |
Placeholder
Placeholder | Sample value | Description |
---|---|---|
%YEAR% | 2016 | The current year |
%MONTH% | 01 | The current month |
%DAY% | 01 | The current day |
%TODAY% | 01.01.16 | The current date |
%TIMESTAMP% | 09-12-06-032 | The current timestamp with milliseconds (hh-mm-ss-fff) (recommended for sorting within the filesystem) |
%OLDFILENAME% | Scanner-01929284 | Filename of the input file |
%MD5% | 3c4cbcc7b0b7422b2c0e99ecfebdab14 | MD5-Hash of the output file |
%PGCNT% | 2 | A number of pages within the saved document |
%LOCALCOUNTER% | 15 | consecutive number for per configuration which will be increased for each saved document by 1 |
%GLOBALCOUNTER% | 628 | consecutive number for per BarcodeOCR installation which will be increased for each saved document by 1 |
Create Subfolders and sort the result files into the folders
BarcodeOCR can create a defined subfolder structure in the selected output folder, where the output documents can automatically be sorted in. Nonexisting subfolders will be created while processing the documents and before saving the result file with the desired file name into the folder.
Use a template for the sort
Most requirements can already be accomplished using a preconfigured template for creating a subfolder structure. Some of the templates can be used using a parameter to adjust the template to your needs:
Name of template | Parameter is used for | Sample (bold = subfolder structure) |
---|---|---|
Date (Format: yy-MM-dd) | no parameter needed | Sample Barcode: INVOICE-1234 |
Date (Format: MM-dd) | no parameter needed | Sample Barcode: INVOICE-1234 |
Date (Format: MM-dd-HH) | no parameter needed | Sample Barcode: INVOICE-1234 |
Day (dd) | no parameter needed | Sample Barcode: INVOICE-1234 |
Hour (HH) | no parameter needed | Sample Barcode: INVOICE-1234 |
Subfolder based on delimiter | delimiter | Sample Barcode: INVOICES@2017@004 |
Custom Date Format | date format) | Sample Barcode: INVOICE-1234 |
Use the first X characters from barcode as subfolder | count of characters | Sample Barcode: INVOICE-1234 Parameter: 7 Path: Outputfolder\INVOICE\INVOICE-1234.pdf |
Use the last X characters from barcode as subfolder | count of characters | Sample Barcode: INVOICE-1234 |
Use an external script to define the name of the subfolder
There are sample files in the folder "Script Samples" in the BarcodeOCR installation folder showing how to customize BarcodeOCR to your needs
If you need to create complex folder structures, the template might not provide all flexibility. In these cases, you can use a PowerShell script to determine the subfolder (or nested subfolders) as well as set the output filename. This script will be launched while processing the file before saving the document into the output folder. All information regarding the document and the source stack will be passed as a parameter to the script to ensure that you have all information in order to create your folder structure.
You can access all collected information regarding the recognized text (if the document was OCRed) as well as all information regarding barcodes and use the information without restricted to determine the filename and the folder structure.
Using this option you can achieve:
- Sort the documents into subfolders - based on keywords within the recognized text (A sample is included as script in the folder "Script Samples" in the Installation directory)
- Sort Invoices into an "Invoice folder", Offers into a separate "Offers folder" as well as all other documents into another folder - based on keywords within the barcode
- Determine the subfolder path using your own algorithm (you can use all script options from PowerShell to do so)
- Set a completely new file name that is not associated with the recognized barcode
- Create a nested folder structure
- Use recognized but ignored barcodes (using filters) as subfolder name
- All kind of other scriptable options
Conflict resolution
Conflicts in the target folder
If conflicts arise on saving (e.g. because a barcode appeared twice in a stack) you have the following options:
Solution options | Description | Typical example |
---|---|---|
Move duplicates to error folder |
| The document was preprocessed and the filename already exists |
Overwrite duplicates |
| The document was preprocessed and the filename already exists |
Intended file name + consecutive number |
| Doubly scanned documents should not be overwritten or sorted out, but instead saved inside the output folder |
Attach to existing files | The pages from the target document are attached to a PDF document already existing in the output location. If no target document exists, it will be created. | Several pages from different scans are to be combined into one target file, which is then manually removed from the output folder once the process is complete |
Conflicts in the error folder
If conflicts arise in the error folder when saving, you have the following options:
Solution options | Description | Typical example |
---|---|---|
Rename duplicates to "Duplicate" + consecutive number |
| The document was preprocessed and the filename already exists |
Overwrite duplicates |
| The document was preprocessed and the filename already exists |
Intended file name + consecutive number |
| Doubly scanned documents should not be overwritten or sorted out, but instead saved inside the output folder |