MetaServer > Help > Export to Folder

030-020 MetaServer Export – Export to Folder

With the MetaServer Export to Folder action, you can export your processed documents to a folder structure or FTP server. You can use fixed values, fields and metadata to name your files and folders. You can also create index files (CSV, XML, TXT,…) containing field values and metadata of the processed documents.

If you also want to export the metadata and file location of the exported documents to a database, you can combine the Export to Folder action with an Export to Database action.

You can use one or multiple export to folder actions in one workflow. This can be useful if you want to export a document differently depending on the field values and/or your workflow’s conditions. For example, rejected documents in Validation, can be exported differently than valid documents.

For example:
A hospital needs to archive patient files containing different types of documents. First, the complete file goes through a classification workflow to separate and categorize each document. Depending on the document type, each document will be exported to another workflow’s watched folder for further processing. Finally, each processed document and index file is exported to an FTP server in a comprehensive folder structure.

01 Export to Folder – Adding the Action

To add an Export to Folder action, select the action after which you want to insert the Export to Folder action and press Add -> Export -> to Folder. The Setup window will automatically open.

You can also open the setup window of an existing Export to Folder action by double-clicking the action or by pressing the setup button on the right side of the action or in the ribbon, as shown below.

In our example, we will make use of the “CB – FLOATING DATA” workflow. This workflow is automatically installed with CaptureBites MetaServer.

02 Export to Folder – Setup

TIP: The thumbnail on the right will follow you, so you can easily refer to the Setup window. Click on the thumbnail to make the image larger.

Don’t forget to add a description to your action.

01 – File Source: press the dropdown button to specify the source of your files. By default, PDF attachment and Imported PDF are selected. Support for other file sources is planned for a future release.

– PDF attachment refers to PDFs that were imported by means of the Import Email action.
– Imported PDF refers to PDFs that were imported by means of an Import from Folder action.

1) Labels: you can change the labels of each file source if you want to use them later as metadata values in your settings.

02 – Destination: select the destination of your exported files.

– Disk: export to a folder on one of your system’s disk drives or on a file server on your local network.
– FTP: connect and export to an FTP Server using the FTP, SFTP or FTPS protocol. This will be explained in more detail later on.

03 Export to Folder – Setup – Files

 
When opening the setup window, the Files tab is open by default.

Disable the Export files option if you don’t want export your PDF documents. This is useful when you only need the metadata of the documents in a CSV or XML format. In that case, you would only export the File Index.

01 – If file exists: press the drop-down arrow to choose one of the following actions if a document file with the same name already exists:

1) Use sequence number: you keep both files by creating a new document file by adding a sequence number after the file name. For example, the second instance of “INVOICE_06-01-2018.PDF” will be named “INVOICE_06-01-2018 (2).”.

2) Overwrite: overwrites the already existing document file with the new document file.

3) Append: merges the new document with the already existing document by adding the new document pages after the last page of the already existing document.

4) Prepend: merges the new document with the already existing document by adding the new document pages before the first page of the already existing document.

NOTE: If your file name contains a file sequence number, this will be automatically ignored if you have selected overwrite, append or prepend.

02 – Folder: here you can browse to or enter the path of your export folder.

03 – File name: you can set up your file name by combining fixed values, fields and metadata. Click on the drop-down arrow to pick from a list of possible values. You can see a preview of your file name below the input field.

You can also use the file name to dynamically make subfolders by simply inserting a “\” (back-slash). For example, if you want to add a dynamic subfolder based on the import date’s year, you would use a file name like this:
{ Import Date, YYYY }\{ Field, Date }_{ Field, Account Number }{ File Sequence Number }{ File Type Extension }

04 Export to Folder – Setup – Email Index

 
Press the Email Index tab to open its settings.

Enable the Create index file option if you import emails and you want to export an index file per email instead of per document. This can be useful if your emails include multiple attachments and you want to create one index file for all the attachments related to that email.

01 Email Index – Format Setup

 
To set up the format and content of your index file, press the “…” button next to the Custom Format option.

The Custom Format Setup Window opens…

01 – File type extension: press the dropdown arrow and select your file type extension.

02 – Encoding: here you can choose to use ASCII, UTF-8 or UTF-16/Unicode encoding. We recommend using the default UTF-8 encoding.

03 – Header, Content, Footer: you can freely define the header, body and footer of your index file by combining fixed values, fields and metadata using the drop-down arrows.

04 – Preview: to see a preview of your index file, press the Preview button.

05 – Export to Folder – Setup – File Index

 
Press the File Index tab to open its settings.

Enable the Create index file option if you want to export the metadata of your processed documents. This includes both the metadata of your files imported from a folder and metadata from attachments from imported emails in an index file.

01 – If file exists: press the drop-down arrow to choose one of the following actions if an index file with the same name already exists:

1) Overwrite: overwrites the already existing index file with the new index file.

2) Use sequence number: you keep both the existing and new index file. You do this by adding a sequence number after the new index file’s name. For example, the second instance of “INDEX-201806.CSV” will be named “INDEX-201806 (2).CSV”.

3) Update: the existing index file will be updated with the new document’s metadata.

This can be useful if, for example, you want to create a daily index file by naming the index file after the current date. The metadata of documents processed during a given date will all be merged in 1 index file. When the day changes, the index file name automatically changes, and a new file is automatically created holding all the metadata of that day.

02 File Index – Format Setup

 
To set up the format and content of your index file, press the “…” button next to the Custom Format option.

The Custom Format Setup Window opens…

01 – File type extension: press the dropdown arrow and select your file type extension.

02 – Encoding: here you can choose to use ASCII, UTF-8 or UTF-16/Unicode encoding. We recommend using the default UTF-8 encoding.

03 – Header, Content, Footer: you can freely define the header, body and footer of your index file by combining fixed words, fields and metadata using the drop-down arrows.

04 – Preview: to see a preview of your index file, press the Preview button.

06 Export to Folder – FTP

01 What is the difference between an FTP, FTPS and SFTP protocol?

 
The major reason for implementing SFTP (Secure File Transfer Protocol) or FTPS (File Transfer Protocol over SSL) versus normal FTP (File Transfer Protocol), is security.

With FTP, all data is passed back and forth between the client and server without the use of encryption. So, your username and password are transmitted in clear text. This protocol works fast, but it makes it possible to listen in and retrieve your confidential information, including login details.

SFTP is a secure replacement for FTP based on the Secure Shell protocol (SSH). Unlike FTP, SFTP encrypts both commands and data providing effective protection against network security risks. SFTP encrypts the session, preventing the detection of your username, password or anything you’ve transmitted.

With SFTP, all the data is encrypted before it is sent across the network.

FTPS is not the same as SFTP. FTPS implements the original FTP protocol through a separate secure tunnel. FTPS (FTP-SSL) is a standard FTP protocol that uses TSL/SSL (TSL = Transport Layer Security, SSL = Secure Socket Layer) to encrypt the control session and, if required, the data session.

02 FTP Setup

 
Press the drop-down arrow next to Destination and select FTP to make its settings visible.

01 – Address, User name, Password: enter your FTP server connection settings. When in doubt, contact your IT department.

02 – Protocol: here you can choose between an FTP, FTPS or SFTP connection protocol. If you’re not sure which protocol to choose, please refer to the information above or contact your IT department.

03 – Port: enter the specified port of your FTP server. When in doubt, contact your IT department. An FTP protocol typically uses Port 21. An SFTP protocol often uses Port 22 or 2222

04 – Proxy: if you want to connect to a proxy server, press the Proxy button to open the setup window.

1) Type, Host, User name, Password: press the drop-down arrow to choose your proxy protocol and enter the connection settings to your proxy server. When in doubt, contact your IT department.

2) Port: enter the specified port of your Proxy server. When in doubt, contact your IT department.

05 – Test: press this button after you’ve filled out your connection settings, protocol and port to test the connection. You’ll see the following pop-up when the connection is successful.

06 – Timeout: here, you can specify the timeout value in seconds. We recommend using the default value of 60 seconds.

07 – High speed transfer: disable this option If your FTP Server doesn’t support high speed transfer. This option is enabled by default.

08 – Destination folders exist: select this option if your FTP server doesn’t allow to create folders and folder are pre-created.

09 – Download and compare files after upload: enable this option to check if the connection to your FTP server is stable. MetaServer does this by checking if your file was completely uploaded to the FTP server. When it detects that the uploaded file is missing data, MetaServer will stop and send you a report error to let you fix the connection issues. After this is done, restart MetaServer.

TIP: you can copy the current settings and paste them in another setup window of the same type. Do this by pressing the Settings button in the bottom left of the Setup window and by selecting Copy. Then open another setup window of the same type and select Paste.