File Content Extraction 25.1
Filter SDK Java Programming Guide

# ExtractFilter

The ExtractFilter program demonstrates the File Extraction interface. The `FilterTest` sample program demonstrates the functionality of the Filtering interface. See FilterTest.

The `ExtractFilter` program demonstrates the following functionality:

- opens a document
- extracts subfiles from a document
- repeats subfile extraction until all subfiles are extracted
- enables you to specify the command-line options listed in the following table

To run `ExtractFilter`

1. Add the location of the `javaapi\KeyView.jar` file, the `javaapi\sample` directory, and the Filter `bin` directory to the `CLASSPATH` environment variable.

2. Type the following:

       java -Djava.library.path=bin_directory ExtractFilter [options] bin_directory input_file output_dir

   where,

   `bin_directory` is the path to the Filter `bin` directory.

   `options` is one or more of the options listed in the following table.

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

   `output_dir` is the path of the folder to write the output files to. This folder does not have to exist.

Options for ExtractFilter Sample Program

Option | Description
--- | ---
`-source-cs charset` | Sets the character set of the source file. `charset` is a character set defined in the Filter class. See Coded Character Sets.
`-target-cs charset` | Sets the character set of the output file. `charset` is a character set defined in the Filter class. See Coded Character Sets.
`-little-end` | Sets the byte order for Unicode text to Little Endian.
`-is` | Sets the input as a stream. The default is file.
`-sis` | Sets the input as a seekable stream. The default is file.
`-os` | Sets the output as a stream. The default is file.
`-ip` | Runs file extraction in the same process as the calling application (in process). See Run Filter In Process.
`-open-user username` | Specifies the user name used to open a protected PST file.
`-open-pass password` | Specifies the password used to open a protected PST file.
`-open-idfile idfile` | Specifies the user ID file used to open a protected PST file.
`-open-createroot` | Creates a root directory on which a hierarchy can be based. See Create a Root Node.
`-ext-fbody` | Extracts the formatted version of the message body (HTML or RTF) from mail files when possible.
`-ext-ptimefile` | Preserve the timestamp on a file when extracting a subfile in File mode.
`-ext-nodir` | Specifies the subfile directory structure is not created.
`-ext-noheader` | Excludes mail header information from extracted message body text file. See Mail Metadata.
`-meta outfile` | Extracts default mail metadata and writes it to a file.
`-meta-all outfile` | Extracts all mail metadata and writes it to a file.

Copyright 1997-2024 Open Text
Version 25.1 | Last updated January 2025

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: File Content Extraction 25.1

Topic Title: ExtractFilter