Importing files using Watched Folders

The FDA watched folder feature makes it possible to add documents to FileHold in the background with minimal or optional user intervention. Users with nearly any role can watch as many folders as they want to configure. When a file appears in the defined folder path, the selected attributes are be assigned to it and it appears as a new document in the FDA Inbox or can optionally be automatically sent to the library. The watched folder configuration unique to the local workstation.

There are a number values that can be set for the new document directly in the watched folder configuration including the destination location in the library, the document schema and metadata values. You can also choose whether or not the input file is deleted after it has been added to the library and whether or not it should be automatically added to the library without further intervention or not. If the watched folder is configured to automatically add the documents to the library, they are first checked to confirm they have all the required metadata field values. If they do not, they are left in the inbox for the user to complete.

Users can create as many watched folders as they need. Extraction rules and auto-filing can work with the Watched Folders tool. Using the extraction rules and auto-filing features require the Automatic Document Importation (ADI) feature to be enabled in the license. Extraction and auto-filing rules are configured by a library administrator or higher role.

If you are a library administrator or higher role, auto-filing templates, auto-filing scripts, or the auto-filing rule applied to the document schema can be used. For non-administrators, the auto-filing rules use the schema default.

Users have the option of setting specific schema and metadata values for the incoming documents or use extraction rules. If using extraction rules, the schema and metadata is determined according to the rule. If both extraction rules are configured on the schema and values are set in the watched folder properties, the watched folder values overwrite the extraction rule values.

If there are missing required metadata fields or the file path cannot be resolved, documents go the user’s Inbox for processing.

Watched folders are also available in the automatic document importation (ADI) feature. This feature should be used when user input is not required, when the folder to watch is on a network and when you would like to use extraction rules on the files.

Watched folders are typically used in conjunction with scanning stations when you are not using a tool like Capture to index them, but their uses are many and varied. See "Send to FileHold" for an example.

Some file extensions are ignored by watched folders for safety reasons, including:  asp, asx, bas, bat, cer, chm, cmd, com, cpl, crt, csh, exe, fxp, hlp, hta, inf, ins, isp, js, jse, ksh, lnk, mda, mdb, mdt, mdw, mde, mdz, msc, msi, msp, mst, ops, pif, prf, prg, reg, scf, scr, sct, shb, shs, tmp, vb, vbe, vbs, vsmacros, vss, vst, vsw, ws, wsc, wsf, and wsh.

To create a Watched Folder

  1. In FDA, go to Tools > Watched Folders and click Add.

  2. In the Browse for Folder window, select the folder that you want to "watch" on your local computer or network drive. For example, select the output folder for a scanned batch of documents.

  3. In the Watched Folder Properties window, the Folder Path to the Watched Folder is shown.

  4. To set a folder location in the library, select the Set a destination library location check box and select one of the following options:
  • Folder location – Click and select a folder. Click OK.
  • Auto-file using – Select one of the auto-filing options:
    • Document schema – The document is filed according to the auto-filing rule set in the schema. If you are not an administrator, this may be the only option available.
    • <Auto-filing template name> – Select the name of the auto-filing template from the list.
    • <Auto-filing script> – Select the auto-filing script from the list.

If no folder location is selected, documents go to the user’s Inbox.

  1. To set the metadata for the documents, select the Set metadata for input files check box and select the Document Schema name from the list.

  • Use only extraction rules – Extraction rules are used to set the metadata.

  • <Document schema name> – Select the schema name from the list and enter any metadata field values. If any metadata values are set, a fixed value is applied to all the documents. If any required fields do not contain values, the option “Automatically send files to the FileHold Library” cannot be enabled since the required value is missing and need to be entered in the Inbox. If the metadata field is set to “read-only”, then you cannot enter a value; this field always uses the default initial value set up in the schema.

  1. Select the Automatically "Send files" to the FileHold Library to automatically send the files to the set folder location. If you do not select this option, then all files go to the Inbox instead of being automatically sent to the folder location. This option is not available unless the Set metadata for input files is enabled.

  2. To delete the files that are successfully imported into the library, select the Delete input files sent to library check box. This keeps the folder clean and reduces the folder size; this could potentially get quite large if you are scanning a lot of documents.

  3. Click Save.

  4. The new Watched Folder appears in the List of Watched Folders.

  5. To delete a Watched Folder, click the red X next to the Watched Folder name in the Watched Folders list.


Watched Folder troubleshooting

Care should be taken to ensure the source of the files is not adding partial files to the watched folder. The FDA looks for new files every 15 seconds. Depending on how the source program adds the file to the folder, it may appear in the folder list before it is completely written. This is more common if the file is very large. If the FDA is able to "see" the filename in the folder, it may start reading the contents before the source program has finished writing them. This could result in incomplete files being added to FileHold. Problems like this are most common when the watched folder is on a network or the source of the files creating them over a network. There are a few ways to mitigate such issues:

  • Do not automatically send files to the FileHold library. In this case, the documents appear in the inbox giving them time to be fully written by the source program. This is method is not fully deterministic, but it works in most practical cases.
  • Have the source of the files write them to a folder that is not being watched. Then have the source program move them to the watched folder. The Windows move function does not add the file to the destination folder list until it has been completely moved.
  • Use manage imports or ADI and an indirect file. Make sure to create the file list XML or delimited file last.