# Default File Names for Extracted Subfiles

When you do not specify a file name in the call to fpExtractSubFile(), in some cases a default file name is applied to the extracted subfile.

## Default File Name for Mail Formats

To avoid naming conflicts and problems with long file names, KeyView applies its own names to the extracted mail items when you do not supply a name in the call to `fpExtractSubFile()`. A non-mail attachment retains its original file name and extension.

When the contents of a mail store or the message body of a mail message are extracted, the extracted file names can include the following:

- The first valid eight characters of the original folder name or "Subject" line of the mail message. If the "Subject" line is empty, the characters `kv` `ext` are used, where `ext` is the format’s extension. For example, the characters would be "`kvmsg`" for MSG and "`kvnsf"` for NSF.

  For notes, the file name is derived from the first 24 characters of the note text. For contact entries, the file name is derived from the full name of the contact.

  The following special characters are considered invalid and are ignored:

  any non-printing character with a value less than `0x1F`
  angle brackets (< >) | double quotation marks (")
  asterisk (*) | forward slash (/)
  back slash (\) | pipe (|)
  colon (:) | question mark (?)

- The characters `_kv` `n`, where `n` is an integer incremented from 0 for each extracted item.

- One of the following extensions:

  Type | File Extension
  email message | `.mail`
  calendar appointment | `.cal`
  contact entry | `.cont`
  task entry | `.task`
  note | `.note`
  journal entry | `.jrnl`
  distribution list | `.dist`
  posting note | `.post`

  - If the type cannot be determined for an MSG or PST file, the file is given a `.mail` extension.

  - If the type cannot be determined for a NSF file, the file is given a `.tmp` extension.

  - The format of a MAIL file is plain text by default, but can be set to RTF with the `KVExtractionFlag_GetFormattedBody` flag.

For example, an MSG mail message with the subject line RE: Product roadmap that contains the Microsoft Excel attachment `release_schedule.xls` is extracted as:

    RE produ_kv0.mail
    release_schedule.xls

If an extracted message contains an embedded OLE object or any attachment that does not have a name, the object or attachment is extracted as `_kv``#``.tmp`.

## Default File Name for Embedded OLE Objects

KeyView can apply a default name to an extracted embedded OLE object when you do not supply a name in the call to `fpExtractSubFile()`. When an embedded OLE object is extracted, the extracted file name can include the following:

- The characters `subfile_kv` `n`, where `n` is an integer incremented from 0 for each extracted object.

- If KeyView can determine the embedded OLE is a Microsoft Office document, the original extension is used. If the file type cannot be determined, the file is given a `.tmp` extension.

For example, a Microsoft Word document (`sales_quarterly.doc`) might contain two embedded OLE objects: a Microsoft Excel file called `west_region.xls`, and a bitmap created in the Word document. The embedded objects are extracted as `subfile_kv0.xls` and `subfile_kv1.tmp`.

© Copyright 2016-2020 Micro Focus or one of its affiliates | Send documentation feedback Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a mail client, and then send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm