File attaching

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
Relsguy
Posts: 2
Joined: Fri Nov 21, 2003 5:42 pm

File attaching

Post by Relsguy »

I would like to setup a count file test that monitors a directory for a .txt file to come in. When that file appears in the directory I would like that file to be attached to an email and sent to our general helpdesk account. My problem I can not seem to figure out is the file name will be different every time so how do I set HM to grab any .txt file and email it out?

I searched the forums and the manual and I did not see anything on this so any help is appreciated!!

Thanks!
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

HostMonitor can grab specific file, it cannot grab any file.
Possible workaround - setup "External" test as master test. This test will be executed before "Count Files" test (dependant test), it can start some script to convert name of a file to predefined name. E.g. you can use simple BAT file like:

Code: Select all

del attach.zip
pkzip -m attach.zip *.txt
As result you will have zip file that contains all txt files (or empty directory if there are no new text files)

Regards
Alex
Relsguy
Posts: 2
Joined: Fri Nov 21, 2003 5:42 pm

Post by Relsguy »

OK great thanks for the advice! That would sure be a nice feature if HM could do grab any file in a directory rather then a specific file name. :)

Thanks again
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Try this update www.ks-soft.net/download/hm415.zip
You will be able to use wildcards in the file name ("send e-mail" action). However HostMonitor will attach just single file

Regards
Alex
Post Reply