Help Home

Screens: Login   Folders   Output files   Filter   Go   Menus: File   Edit   Options   Help

Home
Up

 

 

Special Characters in the Email Filename

Special characters must be used in the email filename to tell EmailPipe where to insert the file sequence number and how to format it. Some variations are shown below, with more detail below it. See also the macros section.

Format specifier Resulting output with a sequence number of 13
file%d.txt file13.txt
file%5.5d.txt file00013.txt
file%-5.5d.txt file13   .txt
file%5d.txt file   13.txt
file%5x.txt file    d.txt
file%5.5x.txt file0000d.txt

Technical details

Format strings passed to the string formatting routines contain two types of objects -- literal characters and format specifiers. Literal characters are copied verbatim to the resulting string. Format specifiers fetch arguments from the argument list and apply formatting to them.

Format specifiers have the following form:

"%" [index ":"] ["-"] [width] ["." prec] type

A format specifier begins with a % character. After the % come the following, in this order:

An optional argument index specifier, [index ":"]
An optional left justification indicator, ["-"]
An optional width specifier, [width]
An optional precision specifier, ["." prec]
The conversion type character, type

The following table summarizes the possible values for type:

d    Decimal. The value is converted to a string of decimal digits. If the format string contains a precision specifier, it indicates that the resulting string must contain at least the specified number of digits; if the value has less digits, the resulting string is left-padded with zeros
x    Hexadecimal. The value is converted to a string of hexadecimal digits. If the format string contains a precision specifier, it indicates that the resulting string must contain at least the specified number of digits; if the value has fewer digits, the resulting string is left-padded with zeros.

Conversion characters may be specified in uppercase as well as in lowercase—both produce the same results.

A width specifier sets the minimum field width for a conversion. If the resulting string is shorter than the minimum field width, it is padded with blanks to increase the field width. The default is to right-justify the result by adding blanks in front of the value, but if the format specifier contains a left-justification indicator (a "-" character preceding the width specifier), the result is left-justified by adding blanks after the value.

 

 

 Contact Us   |  Support   |  DataMystic Newsletter
 © 2004-2006 DataMystic. All rights reserved.