Use BeforeDocumentImport to get the EML/MSG/ZIP filename

You can use the BeforeDocumentImport function to get the EML/MSG/ZIP filename.

To use this script, do the following:

  1. Extract KCSImportScriptingSample.zip (default: C:\Program Files (x86)\Kofax\KIC-ED\KCPlugIn\ScriptSample) to a local directory.
  2. Open Additional settings tab in KC Plug-In Destination configuration. For Advanced batch/document script path option, select Browse and locate the IDocument2_FR6371.cs file.
  3. Select Create document per attachment in Import mappings tab.
  4. In the Kofax Capture batch class configuration, create a document index field to get the MSG/EML/ZIP file name.
  5. Restart the KC Plug-in service.
The default name of the field is KfxExtractedFromFile (case sensitive). If you want to use a different field name, modify the string constant INDEX_FIELD_EXTRACTED_FROM_FILE in the script and publish the batch class.

Additional Settings

To get the name of the email in the ExtractedFrom field, do the following:

  1. Configure the Import trigger file option in the Advanced folder import settings.
  2. For destinations you do not want to import the trigger file into Kofax Capture, configure the trigger file extension (for example, .trg) in Skip importing files with formats.