Attachment name (-AN or -ATTNAME)

The Attachment Name adapter command (-AN or -ATTNAME) specifies that the name of the attachment should be returned together with the attachment itself. This command can only be used on input. It results in the name of the attachment being returned as a header to the data.

-ATTNAME fieldname
Option
Description
fieldname
Specify the name of the header field that should be returned in the header.

For example, to specify myfield as the name of the header field that should be returned in the header:

-ATTNAME myfield

When used with the -HDR option, the attachment name becomes another header field. For example:

From: Mr. X <mrX@mail.net>
Subject: Attachment test
Date: Wed, 3 Apr 2002 10:13:36 -0500
To: mrsX@mail.net
X-Attachment-Name: myday.txt
Breakfast
Kids to school
Go to work

The option takes an optional parameter that is the name of the attachment name field. This is provided for two reasons:

  • To offer a solution in the event that X-Attachment-Name appears in the data, which would cause distinguish ability problems during validation
  • To provide a means to offer a user-defined field name that might be more suited to the context of its use than the default name