Table of Contents |
---|
Introduction
This is the first in a series of articles describing how to get started with using the the JADE Client via its Command Line Interface.
...
Excerpt Include | ||||||
---|---|---|---|---|---|---|
|
JADE Command Line Interface
Excerpt Include | ||||||
---|---|---|---|---|---|---|
|
JADE API
Excerpt Include | ||||||
---|---|---|---|---|---|---|
|
JADE JITL Jobs
Excerpt Include | ||||||
---|---|---|---|---|---|---|
|
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:
- Copy the appropriate jade_settings_*.ini file (Windows or Unix) to the jade_demo sub-folder in your user home directory.
...
Note that comments in the JADE settings profiles are added using double semi-colons (";;").
Running the examples:
- For the examples is assumed that jade.cmd or jade.sh are available in your path or are prefixed by their path name.
- The command line parameterization is identical for use with the Windows and Unix command line
- Run the examples by entering the following in the command line, e.g. for the first of the examples listed below:
...
The following examples are given for Windows environment. Unix users will find the samples in the respective configuration file jade_settings.ini.
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.