set_metadata_types
Specifies metadata trigger file extension or comma-separated list. Overrides set_types().
Member of namespace
mvscanSyntax
bool set_metadata_types (string extensions)Parameters
- extensions
- Type: string
Parameters
String value of extensions of input files that contain pointers to files to be ingested along with metadata to be included in the batch for each file. For multiple types, separate each one with a comma. Any files with extensions not in this list are ignored.It is optional to include a period before each extension. The parameter is not case-sensitive.
Returns
Always True.Level
Batch level Open event only.Details
This action overrides any previous call to set_types(), and forces the action to read properly formatted XML from the metadata trigger file. Then, the action determines which files get ingested, rather than ingesting individual files into the batch. Other settings such as set_min_age() are applied to the metadata files.You must set up the XML file in the correct format to use the set_metadata_type action to scan metadata files into batches.
<input>
<item name="Invoice1" vendor_number="TS265329"
vendor_name="Busy Car Repair" invoice_number="28100">
<filename>C:\Datacap\APT\images\Input\
Invoice_0001S1.tif</filename>
<filename>C:\Datacap\APT\images\Input\
Invoice_0002S1.tif</filename>
</item>
<item name="Invoice2" vendor_number="TS23785354"
vendor_name="Trucking Co." invoice_number="876-3456">
<filename>C:\Datacap\APT\images\Input\
Invoice_0003S1.tif</filename>
<filename>C:\Datacap\APT\images\Input\
Invoice_0004S1.tif</filename>
</item>
</input>- The tag name of the XML root node must be
<input>. - The
<item>nodes represent a group of input files or images that share metadata. - The
<item>nodes must contain at least one attribute, but can have a number of attributes. In this example, the<item>nodes contain the attributesname=,vendor_number=,vendor_name=,invoice_number=. - The
<item>attribute names are entered in the item as text that follows the =. - These name values are prepended with Meta_Item_ when they are written to the DCO to define the metadata variable names that are placed on each page. The attribute values populate the variable values.
- The inner most nodes must be
<filename>and contain items that represent single input files. - A
<filename>can be either a fully qualified path, for example \\server\folder\filename, or a partial path relative to the location of the metadata file such as folder\filename. The number of file names in each repeating item is only limited to the practical limit of how many files you want to ingest in a single batch. - Each file is ingested as a Page in the batch, regardless of the file type or contents.
All of the items in a metadata file are ingested into the same batch. For example, if a metadata file contains 1 node with 50 file names, 50 files are ingested for that single metadata file. If the metadata file contains 5 nodes with 50 file names in each of them, then 250 files are ingested. The external system that creates the metafile must create all of the files to be ingested before it writes the metafile that refers to them.
- Example:
-
set_metadata_types("xml") Scan()This sequence scans for metadata trigger files that end in ".xml".