# FilterFileToFile

The `FilterFileToFile` program filters an input file to an output file using Java API methods in Filter. It demonstrates the following functions:

- filters an input file to an output file.
- extracts the character set if it can be determined by the document reader.
- extracts file format information (document type, format, version, and so on) if available in the source document.
- extracts metadata if available in the source document. This program extracts all the metadata from the document, but only displays the first element of metadata.

## Run FilterFileToFile on Windows

To run `FilterFileToFile` on Windows

1. In the `FilterFileToFile.bat` file, set the following variables.

   `INSTALL_DIR` | The absolute path of the KeyView Filter SDK installation directory.
   `PLATFORM` | The platform name.

2. Run the batch file in the directory `install\javaapi\sample`, where `install` is the path name of the Filter installation directory. Type the following:

       filterfiletofile inputfile outputfile

   where,

   `inputfile` is the path and file name of the source file.

   `outputfile` is the path and file name of the generated file. If a path is not specified, the file is output to the current directory.

## Run FilterFileToFile on UNIX

To run `FilterFileToFile` on UNIX

1. In the `FilterFileToFile.csh` file, set the following variables.

   `INSTALL_DIR` | The absolute path of the KeyView Filter SDK installation directory.
   `PLATFORM` | The platform name.

2. Run the C shell file in the directory `install/javaapi/sample`, where `install` is the path name of the Filter installation directory. Type the following:

       ./FilterFileToFile.csh inputfile outputfile

   where,

   `inputfile` is the path and file name of the source file.

   `outputfile` is the path and file name of the generated file. If a path is not specified, the file is output to the current directory.

_FT_HTML5_bannerTitle.htm