# Save to File

## Contents
Overview Configuration

## Overview
The Save to file filter enables you to write the current message contents to a file. For example, you can save the message contents to a file in a directory where it can be accessed by an external application. This can be used to quarantine messages to the file system for offline examination. This filter can also be useful when integrating legacy systems. Instead of making drastic changes to the legacy system by adding an HTTP engine, the Enterprise Gateway can save the message contents to the file system, and route them on over HTTP to another back-end system.
## Configuration
To configure the Save to file filter, specify the following fields:
Name | Name of the filter to be displayed in a circuit. Defaults to Save to file.
File name | Enter the name of the file that the content is saved to. You can specify this using a property, which is expanded to the specified value at runtime. Defaults to `${id}.out`.
Directory | Enter the directory that the file is saved to. You can specify this using a property, which is expanded to the specified value at runtime. Defaults to `${VINSTDIR}/message-archive`, where `VINSTDIR` is the root of your Enterprise Gateway installation.
Maximum number of files in directory | Enter the maximum number of files that can be saved in the directory. Defaults to `500`.
Maximum file size | Enter the maximum file size in MB. Defaults to `1000`.
Include HTTP Headers | Select whether to include HTTP headers in the file. HTTP headers are not included by default.