File attachment macro format question

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
ironcurtain
Posts: 34
Joined: Mon Apr 28, 2008 10:15 am

File attachment macro format question

Post by ironcurtain »

Hi,
I am not receiving an email when this macro is used

filename_%yyyy%-%mm%-%dd[-1d]%.csv

I am receiving the following message in the email:
Error: Attachment file not found

What is the correct format for the filename please?

Thank you,
Grant
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

1) It depends on how your file named.
2) you cannot use expressions like %dd[-1d]% for the actions. Such expressions were designed for the tests
3) If you are using "Send e-mail" action assigned to some test like "File/Folder Availability" (i.e. you want to find the file and send it by e-mail), you may use %FileName% macro variable for the action

Regards
Alex
ironcurtain
Posts: 34
Joined: Mon Apr 28, 2008 10:15 am

Post by ironcurtain »

Hello Alex,
Sorry I should have mentioned the file name is in the format such as

filename_2009-03-23.csv on the date of 2009-03-24
filename_2009-03-24.csv on the date of 2009-03-25

or

filename_yyyy-mm-(the previous day).csv

What would the macro be for this please?

Thanking you in advance for your time.
Grant
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

As I said you cannot use expressions like %dd[-1d]% for the actions. Such expressions were designed for the tests.
If you are using "Send e-mail" action assigned to some test like "File/Folder Availability" (i.e. you want to find the file and send it by e-mail), you may use %FileName% macro variable for the action.

What test method triggers this action?

Regards
Alex
ironcurtain
Posts: 34
Joined: Mon Apr 28, 2008 10:15 am

Post by ironcurtain »

I do apologise Alex, it is indeed a Folder/File Availability test, with details:

Translate Macros: Yes (checkbox selected)

File or Folder Name:
\\theFull\path\TradeSummary_%yyyy%-%mm%-%dd-[1d]%.csv

Action Profile:
Send email with attachment of the file that was tested if it exists.


So I understand that send email Action property requires using %FileName% for the "Attach File"

May I ask if the macro variables can be used in the email Subject please?
In this format: File emailed is dated %dd%/%mm%/%yy%
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

So I understand that send email Action property requires using %FileName% for the "Attach File"
Well, I cannot say it requires. However you may use this variable to send the file detected by "File/Folder Availability" test method
http://www.ks-soft.net/hostmon.eng/mfra ... .htm#macro
May I ask if the macro variables can be used in the email Subject please?
In this format: File emailed is dated %dd%/%mm%/%yy%
Yes, it should work fine
http://www.ks-soft.net/hostmon.eng/mfra ... m#actEMail

Regards
Alex
Post Reply