Overview :
MXM
FTP Client is designed to provide File Transfert Protocol Client facilities.
It provide functions to connect to, download from, upload to and manage
FTP Sites front regular FTP servers (Medialon FTP Client is compatible
with at least Microsoft IIS FTP Server, Bison FTP Server and CatSoft
Serv-U server).
Multiple and filtered file transferts can be done in a single command
like donwload "*.txt" or Upload "DIR" where "DIR"
is a directory name.
FTP Client Device could use an object container to display FTP Site
browser. If this browser is used, user actions could be automatically
handled by the device like double-click on an item or drag and drop
file into the browser (which will cause to upload to file). This automatic
user management could be disabled to enable programmer to treat user
actions.
> Top
Installation (MXM) :
No special installation required.
> Top
Creation (Device) :
Device
creation window :

Default Local Directory :
Path of the default directory on the local machine where files will
be downloaded or uploaded. Browse button provide a quid way to select
a folder in the local machine.
If the folder does not exist, it will be created.
Browser options :
Show Commands
:
Enable or disable to show commands toolbar in the browser.
Show Path :
Enable or disable to show path toolbar in the browser.
Automatic IHM Mode :
Enable or disable automatic user action handler in the browser. If this
option is selected, user commands (like double-click on a file) are
handled and proceed by the device. If this option is not selected, variables
beginning with User... are set to inform the programmer about user actions
type and parameters.
> Top
Graphical
User Interface:
Display
This MxM provides a graphical view (name "Display")
which can be displayed either as a stand alone window or
inside a User Screen Contenair object with the "Device Control"
Manager command.
> Top
Commands
(List Of) :
Connect
:
Description
: Try to connect to the given FTP server with user
and password parameters.
Parameters :
Address : [Type : String] : IP address or URL of
the FTP server.
User : [Type : String] : Name of the user (loggin
name).
Password : [Type : String] : password for the user
(loggin password).
Usage : This command must be used before any other
operation.
Disconnect
:
Description
: Disconnect from the current FTP server.
Parameters : no parameter.
Retreive
File List :
Description
: Download the file list from the FTP server. This
will retreive the list of availble files in the FTP server
current directory (default is the user root directory).
Parameters : no parameter
Usage : This command should be used each time the
current directory is changed (see below).
Nevertheless, this command must be used before any download.
Download
:
Description
: Download the given file from the FTP server to the
local directory.
Parameters :
Filename : [Type : String] : Name of the file to
download.
LocalPath : [Type : String] : Optionnal local path.
If the parameter is not specified the default local directory
is used (Default local directory is defined in the device
setup).
Usage : This command could be used to download
one or more files and/or directories. Using * caracter
in the filename parameter, it's possible to select a set
of files and/or directories. Ex FileName : "*.txt"
will download all text files in the current FTP directory.
If the given filename is a directory name, the entire
content of this directory will be downloaded.
Before using this command a "Retreive File List"
command must be used to list the contains of remote folder.
Upload
:
Description
: Upload the given file to the FTP server from the
local directory.
Parameters :
Filename : [Type : String] : Name of the file to
upload.
LocalPath : [Type : String] : Optionnal local path.
If the parameter is not specified the default local directory
is used (Default local directory is defined in the device
setup).
Usage : This command could be used to upload one
or more files and/or directories. Using * caracter
in the filename parameter, it's possible to select a set
of file and/or directories. Ex FileName : "*.txt"
will upload all text files in the current FTP directory.
If the given filename is a directory name, the entire
content of this directory will be uploaded. In addition,
if the FileName parameter contain a list of absolute files
path (separated by CRLF sequence) then all specified files
will be uploaded into the current FTP directory.
Change
Directory :
Description
: Change to the given FTP directory.
Parameters :
Directory Name : [Type : String] : Name of the
directory to swap to.
Usage : This command could be used with a directory
name as well as 'coded' directory names like ".."
to go to up one directory level or "/" to go to
user root directory. Directory name could contain sub-directories
names like "/DIR/SUB_DIR/SUB_SUB_DIR".
Before
using this command a "Retreive File List" command
must be used to list the contains of remote folder.
Delete
:
Description
: Delete given file or directory name.
Parameters :
FileName : [Type : String] : Name of file or directory
to delete.
Fail If Not Empty DIR : [Type : Enum] : Specify
if the command must failed if the given filename is a
directory name and that directory is not empty.
Availables
values :
"Yes" : Command failed if the directory
given as filename is not empty otherwise the directory
is delete.
"No" : If the filename is a directory all the content
will be deleted (files and sub-directories).
Usage
: Using * caracter in the filename parameter,
it's possible to select a set of file and/or directories.
Ex FileName : "*.txt" will delete all text files
from the current FTP directory. If the given filename
is a directory name, the entire content of this directory
will be deleted (if the "Fail If Not Empty DIR"
option is not set).
Rename
:
Description
: Rename the given filename.
Parameters :
FileName : [Type : String] : Name of the file or
directory to rename.
New FileName : [Type : String] : Name of the new
file or directory.
Usage : If the "New Filename" does not contain
the same relative path than the "FileName" the
file will be move to the given directory. This does not
work with directories name.
Create
Directory :
Description
: Create a new directory in the current FTP directory.
Parameters :
Directory Name : [Type : String] : Name of the
directory to create.
Abort
:
Description
: Cancel a transfert in progress. File currently in
transfert is not kept.
Parameters : no parameter.
Get
File Info :
Description
: Read file informations.
Parameters :
FileName : [Type : String] : Name of the file or
directory to get info from.
FileType : [Type : Enum] : Variable which will
contains the type of the given file. This parameter is
an outgoing value, it is set when the command execution
finished. This variable should have the following values
:
Availables
values :
"File" : Indicate that the given filename is a file.
"Directory" : Indicate that the given filename is
a directory.
FileSize
: [Type : Integer] : Size of the given filename. This
parameter is an outgoing value, it is set when the command
execution finished.
FileDate : [Type : Date] : Date of creation of
the given filename. This parameter is an outgoing value,
it is set when the command execution finished.
FileTime : [Type : Time] : Time of creation of
the given filename. This parameter is an outgoing value,
it is set when the command execution finished.
Usage
: Before
using this command a "Retreive File List" command
must be used to list the contains of remote folder.
Get File Selection :
Description
: Get a list of files depending on given type and
filter.
Parameters :
FileType : [Type : Enum] : Type of the file to
select.
Availables
values :
"File" : Select only files.
"Directory" : Select only directories.
"Both" : Select files and directories.
Filter
: [Type : String] : This parameter could contain *
caracter to process a filename filtering like "*.txt".
If this parameter is empty no filter is used.
File List : [Type : String] : List of selected
files. This parameter is an outgoing value, it is set
when the command execution finished.
File List Count : [Type : Integer] : Number of
selected files. This parameter is an outgoing value, it
is set when the command execution finished.
Usage : This command could not be used before command
"Retreive File List" have been performed. This command
does not transfert any information from the FTP server
but act as selection in the list of files provided by
the FTP server.
Synchronize
:
Description
: Synchronize the content of a remote site from the
content of a local directory.
Parameters :
FTP Root Name : [Type : String] : Name of root
to be used on the FTP site (if root does not exit, it
is created).
Local Path : [Type : String] : Optionnal
local path. If the parameter is not specified the default
local directory is used (Default local directory is defined
in the device setup).
Usage : This command could be used to synchronize
the content of a remote site from the content of a local
directory.
Added files/directories are added to the remote site as
well as deleted files are remove from the remote site.
Using * caracter in the filename parameter, it's
possible to select a set of file and/or directories. Ex
FileName : "*.txt" will upload all text files in
the current FTP directory. If the given filename is a
directory name, the entire content of this directory will
be synchronized.
Note : This command use a reference file named
"__refdb._ur" which is saved into the remote
site. If this file is missing, the synchronization is
done uploading all files and directories and then the
reference file is created again.
Note
2: The synchronization is done from the local directory
to the remote site. This means that any change made in
the local directory is updated on the remote site but
not the opposite. A change made on the remote site (using
for example another FTP Client) is not updated on the
local directory.
> Top
Variables (List Of) :
Status:
Type : Enum.
Description : Current status of the device connection.
Available Values :
"Unconnected"
: The client device is not connected.
"Connecting" : The client is trying to connect to FTP
server.
"Connecting" : The client is trying to disconnect from
FTP server.
"Connected" : The client device is connected to FTP server.
OperationPending
:
Type : Enum.
Description : Current operation in progress.
Available Values :
"Idle"
: No operation is in progess.
"Connection" : An connection operation to FTP server is
in progress.
"Disconnection" : An disconnection operation from FTP
server is in progress.
"Retreive List" : A file list download is in progress.
"Download" : Files and/or directories download is in progress.
"Upload" : Files and/or directories upload is in progress.
"Changing Directory" : A directory change is in progress (swap
from current directory to another).
"Deleting" : Files and/or directoires erase is in progress.
"Renaming" : File renaming is in progress.
"Creating Directory" : A directory creation is in progress.
"Get Current Directory" : A query current directory is in progress.
CurrentError :
Type : Enum.
Description : Error status of the device.
Available Values :
"None" : No error.
"Connection failed" : Connection operation failed, server
could not be connected
"Loggin failed" : Connection operation failed, user and
password acount not available.
"Retreive List Failed" : Download file list operation
failed.
"Transfert Failed" : The current transfert operation failed.
"File Access Denied" : Requested file operation is not allowed
or privileges access are missing.
"File Missing" : Given filename does not exist.
"Bad File Type" : This operation could be done with this file.
"Filter not allowed" : This operation could be filtered.
"Transfert aborted" : The current transfert operation is aborted.
CurrentPath :
Type : String.
Description : Current path on the FTP server ("/" is
root).
FileList :
Type : String.
Description : List of Files from the FTP server current directory.
FileCount :
Type : Integer.
Description : Number of files in the "FileList".
CurrentFileName
:
Type : String.
Description : Name of the file or directory currently in operation.
TotalData :
Type : Integer.
Description : Number of bytes of the CurrentFileName (in operation).
TransferedData
:
Type : Integer.
Description : Number of currently transfered bytes of the CurrentFileName
(in operation).
TransfertProgress
:
Type : Integer.
Description : Percent of acheivement of current operation in
progress.
UserAction :
Type : Enum.
Description : Status of browser user action. This indicate
what user is doing in the browser
Available Values :
"None" : No action
from user.
"CDUp" : User select command Up One Level (directory).
"Download" : User want to download files and/or directories.
"Upload" : User want to upload files and/or directories.
"ChangeDir" : User want to change directory.
"UploadList" : User want to upload files list.
UserFileName :
Type : String.
Description : Files and/or directories concerned by user action.
UserSourcePath :
Type : String.
Description : Local directory concerned by user action.
UserFileCount :
Type : Integer.
Description : Number of files concerned by user action.
> Top
Support
(Difference with previous versions) :
V 1.0.1:
- Fixed: Parameter "Fails If Not Empty" of command "Delete" is disabled.
- Fixed: Parameter "File Type" of command "Get File Selection" is disabled.
- Fixed: Delete command of a directory go into a endless loop with some FTP servers.
- Fixed: Device might be stuck "Connecting" if the server doesn't answer correctly.
V 1.0.2:
- Added: FTP protocol trace option in configuration file.
- Modified: added optimisation for FTP servers which don't answer to the 'PORT' command correctly.
|