Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
outlinh1. true
outlinh1. true
1printablefalse
2stylh1. none
3indent20px

What is the smartest way to execute a command with JADE

...

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 the SFTP protocol you can use the parameters
    • post_command for each file
    and
    • and 
    • post_transfer_commands at the end of the file transfer session. 
  • The source_ and target_ prefixes for the above parameters allow

    you

    to specify different commands for the source and the target

    servers

    hosts.

  • Note here that ssh-server must the SSH server has to be configured to allow JADE to open a shell.

Example

...

for using pre and post commands programmatically

Code Block
languagejava
titleExample with Unix commands
 objOptions.Target().Post_Command.Value("echo 'File: $TargetFileName' >> t.1;cat $TargetFileName >> t.1;rm -f $TargetFileName");
 objOptions.Target().Pre_Command.Value("touch $TargetFileName");

Example

...

for using  pre and post  commands by configuration

Code Block
languagetext
titleExample with Windows commands
 [Copy_Local2Local_UNC_withNetUse]
 include=Copy_Local2Local_UNC
 preTransferCommands=net use //8of9.sos/c;net use //r2d2.sos/share
  • With FTP you can set commands that can be executed by the ftp-FTP server, meaning that shell commands are not possible.
  • Another possibility would be to use a job chain with JobScheduler and the file transfer JITL job.

...