What is the smartest way with JADE/SOSFTP to execute a command after a successful transfer?
This is only possible with JADE, you cannot do this with SOSFTP.
The method we recommend depends on several factors.
- With sFTP you can use the
post_command
for each file andpost_transfer_commands
at the end of the session. Thesource_
andtarget_
prefixes allow you to specify different commands for the source and the target servers.
Note here that ssh-server must be configured to allow JADE to open a shell.
Example:
objOptions.Target().Post_Command.Value("echo 'File: $TargetFileName' >> t.1;cat $TargetFileName >> t.1;rm -f $TargetFileName"); objOptions.Target().Pre_Command.Value("touch $TargetFileName");
- With FTP you can set commands that can be executed by the ftp-server, meaning that shell commands are not possible.
- Another possibility would be to use a job chain with JobScheduler.