| Home | Download | Order | Contact |
|
Macro strings |
Content Previous Next |
Macro string or command is a keyword which is replaced with the specified data. Macro commands are case sensitive. Every expression must begin and finish with % symbol.
![]() Macro strings Wizard |
For date and time specifying the following macro strings are used:
| • | d - date, |
| • | m – month number, |
| • | y - digit of year, |
| • | h - hours, |
| • | n - minutes, |
| • | s - seconds. |
The additional parameters of macro strings can be entered in any order. If any parameter is not specified the default value is used.
You can use following macro strings in the subject and message text of dispatching LAN messages or emails and execute programs settings window:
| • | %DATE% - this macro will be replaced with the current date. |
| • | %DATE=date_format% - this macro will be replaced with the current date using specified date format. |
Example: %DATE=yyyy-mm-dd%.
| • | %FILE[,KEYS]% - this macro will be replaced with the file involved in the task execution. [KEYS] are the additional parameters, separated by commas: |
PATH=Y - include file path. Default value is N.
DL=character - file name separator. To use this parameter at least on character is required. If this key was not specified the line feed is used as a file name separator.
FILTER=NEW|DEL - specifies which files are to be included into the list: NEW - created and changed files; DEL - deleted files. Default value is NEW.
This macro string can be used with the actions and messages included in the destination list.
Example: %FILE,PATH=Y,FILTER=NEW%.
| • | %FILES[,KEYS]% - this macro will be replaced with a list of the files involved in the task execution. [KEYS] are the additional parameters, separated by commas: |
PATH=Y - include file path. Default value is N.
DL=character - file name separator. It can be one or more characters. If there is no this key the line feed is used as a file name separator.
FILTER=NEW|DEL - specifies which files have to included into the list: NEW - created and changed files; DEL - deleted files. Default value is NEW.
Example: %FILES,PATH=Y,"DL=;"% means files with paths separated by ";" and space characters.
| • | %TASKNAME% - this macro will be replaced with the name of the task. |
| • | %GROUPNAME% - this macro will be replaced with the group name the task belongs to. |
| • | %LOGMSG% - this macro will be replaced with the text defining this task written in the log file. |
| • | %TIME% - this macro will be replaced with the current time. |
| • | %TIME=time_format% - this macro will be replaced with the current time using specified time format. |
Example: %TIME=hh:nn:ss%.
| • | %EXTTEXT,FILE=path to a file[,KEYS]% - load text from a file. Key list: |
FILE=path to a file - path to a file with the text including to the email message.
CR=code of character - specifies a code of character which should replace CR (cartridge return) code in the loaded text. Example: CR=32 (CR will be replaced with space).
LF=code of character - specifies a code of character which should replace LF (line feed) code in the loaded text. Example: LF=124 (LF will be replaced with "|")
| • | %SOURCEPATH% - a path to the source location. |
| • | %EVENTLOGMSG% - text of new event log record for event log monitoring tasks. |
| • | %FROM% - an email sender address from the received letter for the mail box monitoring task. |
| • | %TO% - an email recipient address from the received letter for the mail box monitoring task. |
| • | %SUBJECT% - an email subject from the received letter for the mail box monitoring task. |
| • | %MESSAGEID% - an email message ID field from the received letter for the mail box monitoring task. |
| • | %ATTACHMENT,FILE=path to a file% - any external file can be attached to an email with this macro. Example: %ATTACHMENT,FILE=C:\Readme.txt% |
| • | %COUNT[,KEYS]% - total count of the files involved in the task execution.[KEYS] are the additional parameters: FILTER=NEW|DEL - specifies which files have to included into the list: NEW - created and changed files; DEL - deleted files. Default value is NEW. |
DIR=Y - include directories. Default value is N.
| • | %SPACE% - occupied or free disk space for disk space testing tasks. |
| • | %ENVGET=environment variable name% - the environment variable value. Also see Set environment variable topic. |
You can use following macros in the execute program settings window:
| • | %FILES% - all new, changed or deleted files (see %FILES% notes above); |
| • | %FILE% - command execution for any new, changed or deleted file; |
| • | %FILENEW% - command execution for any new or changed file; |
| • | %FILEDEL% - command execution for any deleted file; |
| • | %PATH% - a path to the file; |
| • | %EVENTLOG_EVENTID% - event id value for Windows event log monitoring task; |
| • | %EVENTLOG_EVENTSOURCE% - event source value for Windows event log monitoring task; |
| • | %EVENTLOG_EVENTTYPE% - event type value for Windows event log monitoring task; |
For tasks using Remote Agent Extension there are macro strings which are replaced with the remote computer name or IP address in case the address is dynamically assigned by the DHCP server:
| • | %REMOTEHOST% - a remote host name; |
| • | %REMOTEIP% - a remote host IP address. |
For tasks using HDD SMART Extension there is %HDDSMART% macro string which is replaced with the SMART parameters reported by the inspected hard drives.
Macro strings which are used for activity reporting are described in Reporting section.
| Content Previous Next |
| © 1998-2006 AAR Software Ltd. | Site map |