Delete file using RMA
Delete file using RMA
Hi,
I created an action profile which should send an email with specific file attached and then delete that file.
The email part is OK.
To delete the file I created an "Execute external program" action:
cmd /c del C:\ProgramData\ABC\BatchErrors\%NewestFile%
I configured the action to be executed by RMA.
The RMA has permission to execute external program.
The file isn't being deleted.
Any idea what could be the issue?
Thanks
I created an action profile which should send an email with specific file attached and then delete that file.
The email part is OK.
To delete the file I created an "Execute external program" action:
cmd /c del C:\ProgramData\ABC\BatchErrors\%NewestFile%
I configured the action to be executed by RMA.
The RMA has permission to execute external program.
The file isn't being deleted.
Any idea what could be the issue?
Thanks
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
%NewestFile% can be specified for test parameters of test methods:
- Folder/File Size
- File/Folder Availability
- Count Files
- Text Log
- Compare Files
Also %NewestFile% can be specified in the "Attach file" parameter of Send e-mail (SMTP) action.
Please check the manual or visit our web site for more information about:
Send e-mail (SMTP) action: http://www.ks-soft.net/hostmon.eng/mfra ... m#actEMail
where can be used Macro variables http://www.ks-soft.net/hostmon.eng/mfra ... htm#macros
- Folder/File Size
- File/Folder Availability
- Count Files
- Text Log
- Compare Files
Also %NewestFile% can be specified in the "Attach file" parameter of Send e-mail (SMTP) action.
Please check the manual or visit our web site for more information about:
Send e-mail (SMTP) action: http://www.ks-soft.net/hostmon.eng/mfra ... m#actEMail
where can be used Macro variables http://www.ks-soft.net/hostmon.eng/mfra ... htm#macros
HostMonitor/RMA actions allow you to remove specific file so its not a problem when you know file name.
If you don't know name, that's the problem...
May be there is some workaround but I need to understand your settings.
I am confused at the moment:
- RMA cannot send e-mails, so I assume you are using some 3rd party application? Then I do not understand how you pass %NewestFile% to that application
- If you send e-mail using HostMonitor then HostMonitor has access to the file so it can remove it. Why do you use RMA? Read-only access for account used by HostMonitor?
What kind of test triggers this actions?
Regards
Alex
If you don't know name, that's the problem...
May be there is some workaround but I need to understand your settings.
I am confused at the moment:
- RMA cannot send e-mails, so I assume you are using some 3rd party application? Then I do not understand how you pass %NewestFile% to that application

- If you send e-mail using HostMonitor then HostMonitor has access to the file so it can remove it. Why do you use RMA? Read-only access for account used by HostMonitor?
What kind of test triggers this actions?
Regards
Alex
Then you may use %FileName% variable for both actions
http://www.ks-soft.net/hostmon.eng/mfra ... .htm#macro
Note: there is another problem. This action should be started after Send-EMail sends the file, right? Then I think you need to start this action after "2nd consecutive bas result" (if you send e-mail after 1st bad result). If some 3rd party application can add another file between actions, then this file will not be removed...
Regards
Alex
http://www.ks-soft.net/hostmon.eng/mfra ... .htm#macro
Note: there is another problem. This action should be started after Send-EMail sends the file, right? Then I think you need to start this action after "2nd consecutive bas result" (if you send e-mail after 1st bad result). If some 3rd party application can add another file between actions, then this file will not be removed...
Regards
Alex