Table of Contents |
---|
Introduction
This is the first in a series of articles describing how to get started with using the JADE Client via its Command Line Interface and configuring simple file management tasks.
...
- Getting Started and Downloading files
- Simple File Selection
- More Advanced File Selection
- Checking files for completeness
- Public / Private Key Authentication
...
JADE Command Line Interface
...
JADE API
...
JADE JITL Jobs
...
Requirements
The JADE Client should be installed
- You can download the JADE Client from our JADE Download Page or from SourceForge.
- Installation of JADE on Unix systems is covered in the How to install JADE article.
About these examples
- This article describes operation of the JADE Client from the command line, e.g. by using a batch script. The other methods of operating the Client are:
- using the JADE API
- using the JobScheduler's JADE JITL Jobs
- The examples described in this article have been written for use on a Windows computer but can easily be adapted for Unix environments. Settings files for Windows and Unix systems are available for download via the link in the next section.
- The examples presented on this page use public FTP and SFTP servers that we have configured for this purpose on our web site.
- Both servers have the same address:
- A user demo can log on with password demo and download demonstration files. They cannot upload or delete files.
- Comments in JADE settings profiles are added using double semi-colons (";;").
Setting up the examples:
- For Windows users:
- Create a jade_demo folder in your user home directory with a and b sub-folders like this:
mkdir %USERPROFILE%\jade_demo
mkdir %USERPROFILE%\jade_demo\a
mkdir %USERPROFILE%\jade_demo\b
- Download the jade_settings_windows.ini file containing the example profiles presented in this article to the %USERPROFILE%/jade_demo folder and rename it to jade_settings.ini
- Create a jade_demo folder in your user home directory with a and b sub-folders like this:
- For Unix users:
- Create a jade_demo folder in your user home directory with a and b sub-folders like this:
mkdir ~/jade_demo
mkdir ~/jade_demo/a
mkdir ~/jade_demo/b
- Download the jade_settings_unix.ini file containing the example profiles presented in this article to the ~/jade_demo folder and rename it to jade_settings.ini
- Create a jade_demo folder in your user home directory with a and b sub-folders like this:
:
- For Windows users the location for the jade.cmd file is:
C:\Program Files\sos-berlin.com\jade\client\bin
- or the location that was specified when installing JADE
- for Unix users the location for the jade.sh file is:
~/sos-berlin.com/jade/client/bin
- or the location that was specified when installing JADE
Note that comments in the JADE settings profiles are added using double semi-colons (";;").
Running the examples:
- Either open the command line interface in the location where you have installed the jade.cmd or jade.sh files or use suitable path name prefixes.
- The command line parameterization is identical for both the Windows and the Unix command line.
- Run the examples by entering the following in the command line, e.g. for the first of the examples listed below:
Code Block | ||||
---|---|---|---|---|
| ||||
jade.cmd -settings="%USERPROFILE%\jade_demo\jade_settings.ini" -profile="ftp_server_2_local" |
Code Block | ||||
---|---|---|---|---|
| ||||
./jade.sh -settings="${HOME}/jade_demo/jade_settings.ini" -profile="ftp_server_2_local" |
All other examples in this series of articles list the profile settings and command line call for Windows environments. Unix users will find suitable profile settings in the Unix version of the jade_settings.ini file which was linked above and will be able to adapt the Windows command line calls in the manner shown above.For setting-up and running the examples see Using the tutorials with the JADE Client Command Line Interface
Simple JADE file transfer operations - download by FTP and SFTP
Transferring the contents of a folder by FTP
In this example the contents of a folder on a remote host are downloaded from our demonstration FTP server and saved on your local file system.
Example
The following profile from your settings file will be used to run the example on your computer:
...
Code Block | ||||
---|---|---|---|---|
| ||||
jade.cmd -settings="%USERPROFILE%\jade_demo\jade_settings.ini" -profile="ftp_server_2_local" |
Behavior
JADE will log onto the remote server and download all the files it finds in the source_dir folder before stopping.
...
Note also that the transfer mode JADE uses for FTP transfer can be specified using the transfer_mode parameter (not used in the example). This can be either ascii or binary (the default setting).
Transferring the contents of a folder by SFTP with password authentication
This example uses the 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.
As the new profile name suggests, the SFTP protocol is used in this profile and authentication is by user/password. Key pair authentication is described later in this series of articles.
Example
The profile is included in the jade_settings_windows.ini file as follows:
...
Code Block | ||
---|---|---|
| ||
jade.cmd -settings="%USERPROFILE%\jade_demo\jade_settings.ini" -profile="sftp_server_2_local_pass" |
Behavior
As with the FTP transfer profile, JADE will log onto the remote server and download all the files in the source_dir folder before stopping.