Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Interim save

...

In this example the contents of a folder on a remote host are downloaded from public FTP server that the SOS GmbH demonstration FTP server has configured for demonstration purposes are copied and saved on to the local file system.

The full configuration for this operation is shown in the XML Editor screenshot below.

...

  • The Fragments elements cover the protocol-specific parts of the configuration - in the current configuration these are that the protocol that is to be used, and the connection and authentication. 
    • Note that a file transfer operation usually requires two Fragments - one for the source part of the transfer and one for the target. However a target fragment is not required here as the the target is the local file system.
    • Any number of Fragments can be predefined within a configuration and specified as required using their name attribute - in the example configuration this is ftp_demo_sos-berlln. This predefinition of Fragments allows their reuse and keeps the configuration well structured.
    • Note that it is not necessary to specify a port here as JADE will automatically use the required value of 21 for FTP operations unless specified otherwise.
  • The Profile elements contain the parameters that are specific to the current operation
    • the Operation to be carried out is copy,
    • the ftp_demo_sos-berlin Fragment that is to be used for the source part of the operation,
    • the  files that are to be transferred:
      •  all files defined using the .* FileSpec
    • the directory in which the files to be transferred is looked for:
      • defined using  / file path,
    • the directory that files are to be transferred to: ${USERPROFILE}\jade_demo\a
      (on a Linux system the equivalent location would be ${HOME}/jade_demo/a ).
  • The ref attribute in the FTPFragmentRef element is used to specify the Fragment to be used - in this case for the source part of the operation.

...

JADE will log onto the remote server and download all the files it finds in the source Directory folder (six) before stopping.

Note that by default JADE will create the target folder and/or path if it does not exist and if JADE has the necessary permissions. It will also overwrite any files it finds in the target directory with the same names as files it is downloading.

...

Transferring the contents of a folder by SFTP with password authentication

This example uses the SFTP protocol and password authentication to copy the files in a folder on a public SFTP server that has been set up in parallel to the FTP server used in the first example to the local file system.

Configuration

While this operation is similar to that described in the first example, it is necessary to create both new Fragment and Profile elements in the configuration.

Fragment element

The new SFTPFragment is generated by selecting the ProtocolFragments element and using the Add child context menu item (right hand mouse click) in the same way as the FTPFragment was added in the previous example. The completed SFTPFragment configuration is shown in the firat screenshot below. Please note:

  • It is not necessary to specify a port here as JADE will automatically use the required value of 22 for SFTP unless specified otherwise.
  • The new fragment will be addressed with the sftp_demo_sos-berlin_passname attribute.
  • The Password element is not a direct descendant of the Authentication element as was the case with FTP - this allows the use of an alternative authentication method (key pair authentication, described in the Public / Private Key Authentication tutorial)

 

Profile element

The Profile element required for this example will be almost identical to the FTP Profile from the previous example, with the exception that an SFTPFragmentRef element is required this time. In this case we suggest that the following procedure is used:

  • generate the new Profile by duplicating the ftp_server_2_local element using the XML Editor's Copy and Paste functions, which are available using the XML Editor's context menu.
  • delete the FTPFragmentRef element and add a new SFTPFragmentRef element

The we second profile in our examples settings file, sftp_server_2_local_pass, which is quite similar to the ftp_server_2_local profile used in the previous example.

...