Export messages or addresses - /EXPORT command

Top  Previous  Next

The /EXPORT command allows the batch export of e-mail messages from a specified folder to multiple RFC-822 message files or to UNIX mailbox files. This command also allows the export of address book entries if the LDIF parameter is specified.

 

 

Syntax

 

/EXPORT[parameter1[;parameter2[;parameter3[...]]]

 

 

Parameters

 

USER=value or U=value

value is the name of the source account. If no FOLDER parameter is specified, the source folder will be the Inbox of the given account.

PASSWORD=value or P=value

value is the password which will unlock the account if it is needed.

FOLDER=value or F=value

value is the source folder's pathname. If the pathname does not include an account name, The Bat! will search all accounts for a folder with a matching name; the first folder found will be used as the source folder. If the specified folder is not found, the Inbox folder of the source account is used.

DIR=value or D=value or OUT=value or O=value

value is the pathname for the output directory (for RFC-882 messages) or for the output path and file name (for UNIX mailbox). If RFC-822 format is chosen, the exported messages are stored in the output directory in files sequentially named xxxxxxxx.MSG (each "x" character corresponds to a digit from 0 to 9). When the export starts, The Bat! calculates the starting xxxxxxxx number by searching the output directory for the files with names in the same format and, in the case where such files are found, the output file names will begin immediately after the greatest number found. For example, if file 00001234.MSG was in the output directory, the first exported message will be named 00001235.MSG.

UNIX or X

this parameter tells The Bat! that the output file will be in UNIX mailbox format. In this case, the DIR parameter specifies the name of the output file. By default, output files are in RFC-822 message format.

READ or R

when this parameter is used, only read messages are exported. By default, all read and unread messages are exported.

UNREAD or N

when this parameter is used, only unread messages are exported.

REPLIED or RE

when this parameter is used, only replied messages are exported. By default, all replied and non-replied messages are exported.

UNREPLIED or NR

when this parameter is used, only non-replied messages are exported.

PARKED or PR

when this parameter is used, only parked messages are exported. By default, all parked and non-parked messages are exported.

UNPARKED or UP

when this parameter is used, only non-parked messages are exported.

MAXAGE=value or  AGE=value or A=value

value specifies the maximum age (in days) of messages to be exported. If the age of a message exceeds the specified maximum age, the message will not be exported. By default the maximum age is not limited.

START=value or S=value

value specifies the number of the starting message in the source folder. All messages located before the starting message will not be exported. If a negative value is given, the starting message number is calculated by subtracting the positive value from the number of messages in a folder, for example, if -5 is specified, that means that the export will start from the fifth message from the end of the message base.

END=value or E=value

value specifies the number of the final message in the source folder for the export operation. All messages located after this final message will not be exported. If a negative value is given, the last message number is calculated by subtracting the positive value from the number of messages in the folder, for example, if a value of -2 is given, this means that the export will end at the second message from the end of the message base.

OVERRIDE or V

(only used when either the UNIX or the LDIF parameter has been specified) if this parameter is specified, The Bat! will overwrite the output file when it already exists. By default, The Bat! will add new messages to the end of the mailbox file.

DELETE or DEL or W

if this parameter is specified, all messages processed will be deleted at the end of a successful export operation.

LDIF

if this parameter is specified, an address export will be performed. The OUTPUT parameter specifies the name of an output file that will receive exported data in LDIF format.

ADDRESSBOOK=value or  AB=value or BOOK=value

(only for use with the LDIF parameter) value specifies a name, filename or the full path of the address book which is to be exported. If no address book is specified, The Bat! will use the default address book.

GROUP=value or G=value

(only for use with the LDIF parameter) value specifies the handle of the address group which is to be exported. If no address book is explicitly specified, The Bat! will search all address books for the first group whose name matches the specified handle.

 

 

Examples

 

/EXPORTU="My account 1";F="Friends\Sam";DIR=C:\InFiles\Sam\;S=-20

 

/EXPORTF="\\Account1\Business\Unsorted";UNIX;O=C:\InFiles\Unsorted\Mail.mbx;UNREAD

 

/EXPORTLDIF;AB="My Book";Group="My Group";O="C:\MyGroupFile.LDIF"

 

/EXPORTLDIF;Group="My Test Group";O="C:\MyTestGroup.LDIF"

 

Note: To separate parameters, use semicolons (";" characters). Do not put spaces between parameters when using the /EXPORT command from the command line because a space-separated mask will be interpreted as the next command line parameter and will not be processed as intended.        

Note: If a parameter value contains space characters, enclose it in quotation marks. If a value contains quotation marks, you should use single quotes (" ' " characters).