User guide

eWON 500-2001-4001-4002 User Guide - Export Block Descriptors
eWON 500®2001®4001®4002® Version 4_3_0 - User Guide - 10/5/05 - ©ACT'L sa - Page 210
11.3.8.3.1 $fn [File Name]
This field is used for specifying a file name to the export data.
Usually this file name is used to specify the output of the data, for example when sending an attachment to an Email.
In this case, the $fn file name gives the name of the attachment:
When doing a PUTFTP, then $fn does not need to be specified, because the PUTFTP command manages the name of the destination file:
There is one special case: when a user file ($dtUF) is exported; in that case, the file name is the name of the user file
(i.e. not only the destination file name but also the source file name).
Examples:
Using $fn in a send mail string:
Use the above syntax if you want the attached file to keep its name.
SENDMAIL "MailReceiver@YourMail.com", "", "Mail Subject", "&[$dtUF $uf/myfile.txt $fn/myfile2.txt]"
Use the above syntax if you want the attached file to be received with a different name.
11.3.8.3.2 $uf [User File]
This field is required when sending a file from the eWON to an FTP server, in case the file names on the eWON and the server must be different.
The $uf parameter specifies the "destination name" of the file which will be sent to the FTP Server.
Another use of $uf is when sending a mail with an attachment, in case you want the attachment to have a different name
from its name in the eWON (see example in chapter “$fn [File Name]” on page 210)
The file name can be preceded by the name of the subdirectory inside the /usr directory:
• Syntax 1:
/myfile.txt
(myfile.txt is in the /usr directory)
• Syntax 2:
/mydir/myfile.txt
(myfile.txt is in the /usr/mydir directory)
Note:
The first "/" is optional.
PUTFTP "MyFileWithANewName.txt", "[$dtUF $uf/myfile.txt]"
SENDMAIL "MailReceiver@YourMail.com", "", "Mail Subject", "Mail text &[$dtUF$fn/myfile.txt]"