I would like to execute a script after i have recieved a file from an ftp server.
I have been playing with the Demo Server.
Reading it seems possible to to add rule.xml file.
I have tested a bit but i cant se that anything is happening.
Some advice how to usre the rule.xml file
Hello,
If you use a WaarpR66server as a ftp client to receive a file from a ftp server is should be possible.
To add a rule to your WaarpR66 server you can use the command loadconf
or loadrule
.
A rule file is a xml file with the folowing structure:
idrule: the name of the rule
mode: 1=Send (client is the origin of the file) 2=Receive (client is the destination of the file)
rpretasks: list of tasks to execute by the receiver before the file is transfered
rposttasks: list of tasks to execute by the receiver after the file is transfered
rerrortasks: list of tasks to execute by the receiver if the transfer fails
spretasks: list of tasks to execute by the sender before the file is transfered
sposttasks: list of tasks to execute by the sender after the file is transfered
serrortasks: list of tasks to execute by the sender if the transfer fails
you can find an example on this page.
A simple rule in your case should be like this:
<rule>
<idrule>scriptPostFTP</idrule>
<mode>2</mode>
<rposttasks>
<tasks>
<task>
<type>EXEC</type>
<path>path/to/script</path>
<delay>0</delay>
<rank>0</rank>
</task>
</tasks>
</rposttasks>
</rule>
To better help you with your setup can you give me more information ?
- Which Waarp component do you use ?
- How do you invoke it ?
Kind regards.