# Load File

## Contents
Overview Configuration

## Overview
The Load file filter enables you to load the contents of the specified file, and set them as message content to be processed. When the contents of the file are loaded, they can be passed to the core message pipeline for processing by the appropriate message filters. For example, the Load file filter might be used in cases where an external application drops XML files on to the file system to be validated, modified, and potentially routed on over HTTP, JMS, or simply stored to a directory where the application can access them again. For example, this sort of protocol mediation can be useful when integrating legacy systems. Instead of making drastic changes to the legacy system by adding an HTTP engine, the Enterprise Gateway can load files from the file system, and route them on over HTTP to another back-end system. The added benefit is that messages are exposed to the full compliment of message processing filters available in the Enterprise Gateway. This ensures that only properly validated messages are routed on to the target system.
## Configuration
To configure the Load file filter, specify the following fields:
Name | Name of the filter to be displayed in a circuit. Defaults to Load file.
File | Specify the path to the file that the content is loaded from (for example, `c:/workspace/example_file.xml`).
Output directory | Specify the directory to write the output to at the end of processing (for example, `c:/my_app/output_dir`).
File contents | Choose one of the following options: Raw File HTTP Message including HTTP Headers This enables you to load the contents of a raw file, or to load archived HTTP messages from disk.
Finishing processing | Specify the action to take when processing is complete: Do nothing Delete loaded file Move loaded file to following directory If you select Move loaded file to following directory, the Directory field is enabled to allow you to specify the directory that the file is moved to. The default is Do nothing.