# 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 folders and mail items when a name is not supplied in the call to `ExtractSubFile`. 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 might 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 `kvext` are used, where `ext` is the format's extension. For example, the characters would be "`kvmsg`" for MSG, and "`kvnsf`" for NSF.

  The following special characters are considered invalid and are ignored:

  - any non-printing character with a value less than `0x1F`

  - angle brackets (< >)

  - asterisk (*)

  - back slash (\)

  - colon (:)

  - double quote (")

  - forward slash (/)

  - pipe (|)

  - question mark (?)

  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 characters `_kvn`, where `n` is an integer incremented from 0 for each extracted item.

- One of the following extensions:

  Type | File Extension
  --- | ---
  email message | `.mail .rtf` (NSF files)
  calendar appointment | `.cal`
  contact entry | `.cont`
  task entry | `.task`
  note | `.note`
  journal entry | `.jrnl`
  distribution list | `.dist`

  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 an NSF file, the file is given a `.tmp` extension.

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`.

_FT_HTML5_bannerTitle.htm