PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • The FTP
  • Use convention
  • Principle
  • Relative path/Absolute path
  • Secure FTP server: SFTP and FTPS protocols
  • 1. SFTP protocol
  • 2. FTPS protocol
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Handling files on an FTP server
Overview
The FTP (File Transfer Protocol) is a protocol used to transfer files from a site to another remote site. This protocol is used to exchange files by TCP/IP or Internet.
Several thousands of file servers can be accessed by FTP on Internet. These servers propose shareware or freeware to the public.
WINDEV and WEBDEV include several WLanguage functions allowing you to manage files on an FTP server from your applications or sites.
Versions 15 and later
Android The FTP is now available for the Android applications.
New in version 15
Android The FTP is now available for the Android applications.
Android The FTP is now available for the Android applications.
Versions 18 and later
iPhone/iPad The FTP is now available for the iPhone/iPad applications.
WINDEVLinux The FTP is now available for the WINDEV applications in Linux.
WEBDEV - Server codeLinux The FTP is now available for the WINDEV sites in Linux.
New in version 18
iPhone/iPad The FTP is now available for the iPhone/iPad applications.
WINDEVLinux The FTP is now available for the WINDEV applications in Linux.
WEBDEV - Server codeLinux The FTP is now available for the WINDEV sites in Linux.
iPhone/iPad The FTP is now available for the iPhone/iPad applications.
WINDEVLinux The FTP is now available for the WINDEV applications in Linux.
WEBDEV - Server codeLinux The FTP is now available for the WINDEV sites in Linux.
The FTP

Use convention

  • In theory, you cannot connect to an FTP site without an FTP account and a password. Only a user with an account and a password can connect to this site.
  • Practically, all the servers found on Internet have an Anonymous account. The password of this account is not implemented but an email address will be requested.
To download the files found on an FTP server, all you have to do is connect as "anonymous user".
To upload files to an FTP server (to send HTML pages to your Web site for example), a non-anonymous account and a password are required.
Principle
To handle the files found on an FTP server from a WINDEV application or from a WEBDEV site, you must follow these rules:
  1. Connecting to an FTP server (FTPConnect).
  2. Sending and retrieving files (according to the connection mode).
    For a passive connection, the WINDEV application or the WEBDEV site must request the authorization from the FTP server before each file operation on the server. You can also:
    • find out the characteristics of files found on an FTP server: attributes, size, ...
    • handle the files found on an FTP server: creation, deletion, ...
    • list the files of a directory found on the FTP server by running a procedure used to perform a process for each file found.
  3. Closing the connection to the server (FTPDisconnect).
Caution:
  • The TCP/IP communication protocol must be installed and an IP address must be defined.
  • An FTP server must be installed and configured on one of the computers used to perform the transfer.
  • Android Caution: The FTP functions cannot be used in the Android emulator.
Relative path/Absolute path
The notions of relative path and absolute path are very important in an FTP application.
  • A path starting with a slash is considered as being an absolute path: it is the path in relation to the root of the FTP server (parameter specific to the server).
    ex: /pub/user/FLO
  • A path not starting with a slash is considered as being a relative path, which means a path given in relation to the current directory. This current directory can be returned or modified by FTPCurrentDir.
When connecting to an FTP site, the initial directory (the "home directory" of the user) is not necessarily found at the root of the FTP server. Therefore, we recommend that you use relative paths.
Versions 18 and later
Secure FTP server: SFTP and FTPS protocols
WINDEVWEBDEV - Server codeWindowsAndroidAndroid Widget Different modes for secure connection are available:
  • FTPIS: FTP secured according to the SSL protocol with implicit encryption.
  • FTPES: FTP secured according to the SSL protocol with explicit encryption.
  • SFTP: FTP secured by a SSH channel.
To use one of these connection modes, all you have to do is use FTPConnect and specify the requested mode.
Versions 22 and later
WINDEV MobileAndroidAndroid Widget The secure connection mode (FTPS, FTPES and SFTP) are now available for the Android applications and for the Android Widgets.
New in version 22
WINDEV MobileAndroidAndroid Widget The secure connection mode (FTPS, FTPES and SFTP) are now available for the Android applications and for the Android Widgets.
WINDEV MobileAndroidAndroid Widget The secure connection mode (FTPS, FTPES and SFTP) are now available for the Android applications and for the Android Widgets.
WINDEVWEBDEV - Server codeWindowsAndroidAndroid Widget

1. SFTP protocol

SFTP is the acronym for "Secure File Transfer Protocol". This protocol is based on a SSH channel (secure SSH connection).
The following symmetric encryption algorithms are supported: 3DES, Blowfish, AES and APRCFOUR.
This protocol is used by the Unix and Linux servers.
WINDEVWEBDEV - Server codeWindowsAndroidAndroid Widget

2. FTPS protocol

FTPS is the acronym for "File Transfer Protocol Secure". The communication is secured by the SSL protocol.
The following symmetric encryption algorithms are supported: 3DES, Blowfish, AES and APRCFOUR.
This protocol is used by the IIS Web servers.
Caution: The certificate certifying the company for certificate certification must be saved in the registry of local certificates.
Example:
  • The "XX" company generates a certificate for the "DocPC" server: "xx-DocPC".
  • The "xx-DocPC" certificate is used for configuring the server.
  • On the contrary, the certificate certifying "XX" (let's call it the "XX certificate") must be saved on the client computer.
Most of the certifying companies are already saved in the operating system of the client computer.
However, if a specific company creates a certificate and if the base certificate is not saved on the client computer, the error "The certificate cannot be checked" will occur.
New in version 18
Secure FTP server: SFTP and FTPS protocols
WINDEVWEBDEV - Server codeWindowsAndroidAndroid Widget Different modes for secure connection are available:
  • FTPIS: FTP secured according to the SSL protocol with implicit encryption.
  • FTPES: FTP secured according to the SSL protocol with explicit encryption.
  • SFTP: FTP secured by a SSH channel.
To use one of these connection modes, all you have to do is use FTPConnect and specify the requested mode.
Versions 22 and later
WINDEV MobileAndroidAndroid Widget The secure connection mode (FTPS, FTPES and SFTP) are now available for the Android applications and for the Android Widgets.
New in version 22
WINDEV MobileAndroidAndroid Widget The secure connection mode (FTPS, FTPES and SFTP) are now available for the Android applications and for the Android Widgets.
WINDEV MobileAndroidAndroid Widget The secure connection mode (FTPS, FTPES and SFTP) are now available for the Android applications and for the Android Widgets.
WINDEVWEBDEV - Server codeWindowsAndroidAndroid Widget

1. SFTP protocol

SFTP is the acronym for "Secure File Transfer Protocol". This protocol is based on a SSH channel (secure SSH connection).
The following symmetric encryption algorithms are supported: 3DES, Blowfish, AES and APRCFOUR.
This protocol is used by the Unix and Linux servers.
WINDEVWEBDEV - Server codeWindowsAndroidAndroid Widget

2. FTPS protocol

FTPS is the acronym for "File Transfer Protocol Secure". The communication is secured by the SSL protocol.
The following symmetric encryption algorithms are supported: 3DES, Blowfish, AES and APRCFOUR.
This protocol is used by the IIS Web servers.
Caution: The certificate certifying the company for certificate certification must be saved in the registry of local certificates.
Example:
  • The "XX" company generates a certificate for the "DocPC" server: "xx-DocPC".
  • The "xx-DocPC" certificate is used for configuring the server.
  • On the contrary, the certificate certifying "XX" (let's call it the "XX certificate") must be saved on the client computer.
Most of the certifying companies are already saved in the operating system of the client computer.
However, if a specific company creates a certificate and if the base certificate is not saved on the client computer, the error "The certificate cannot be checked" will occur.
Secure FTP server: SFTP and FTPS protocols
WINDEVWEBDEV - Server codeWindowsAndroidAndroid Widget Different modes for secure connection are available:
  • FTPIS: FTP secured according to the SSL protocol with implicit encryption.
  • FTPES: FTP secured according to the SSL protocol with explicit encryption.
  • SFTP: FTP secured by a SSH channel.
To use one of these connection modes, all you have to do is use FTPConnect and specify the requested mode.
Versions 22 and later
WINDEV MobileAndroidAndroid Widget The secure connection mode (FTPS, FTPES and SFTP) are now available for the Android applications and for the Android Widgets.
New in version 22
WINDEV MobileAndroidAndroid Widget The secure connection mode (FTPS, FTPES and SFTP) are now available for the Android applications and for the Android Widgets.
WINDEV MobileAndroidAndroid Widget The secure connection mode (FTPS, FTPES and SFTP) are now available for the Android applications and for the Android Widgets.
WINDEVWEBDEV - Server codeWindowsAndroidAndroid Widget

1. SFTP protocol

SFTP is the acronym for "Secure File Transfer Protocol". This protocol is based on a SSH channel (secure SSH connection).
The following symmetric encryption algorithms are supported: 3DES, Blowfish, AES and APRCFOUR.
This protocol is used by the Unix and Linux servers.
WINDEVWEBDEV - Server codeWindowsAndroidAndroid Widget

2. FTPS protocol

FTPS is the acronym for "File Transfer Protocol Secure". The communication is secured by the SSL protocol.
The following symmetric encryption algorithms are supported: 3DES, Blowfish, AES and APRCFOUR.
This protocol is used by the IIS Web servers.
Caution: The certificate certifying the company for certificate certification must be saved in the registry of local certificates.
Example:
  • The "XX" company generates a certificate for the "DocPC" server: "xx-DocPC".
  • The "xx-DocPC" certificate is used for configuring the server.
  • On the contrary, the certificate certifying "XX" (let's call it the "XX certificate") must be saved on the client computer.
Most of the certifying companies are already saved in the operating system of the client computer.
However, if a specific company creates a certificate and if the base certificate is not saved on the client computer, the error "The certificate cannot be checked" will occur.
Related Examples:
The FTP functions Unit examples (WINDEV): The FTP functions
[ + ] Using the main FTP functions of WINDEV:
- Connect to a FTP server
- List the files and directories found on the FTP server
- Retrieve the files found on the FTP server
- Disconnect from a FTP server
The FTP functions Unit examples (WEBDEV): The FTP functions
[ + ] This example presents the main FTP functions of WEBDEV and it allows you to:
- Connect to an FTP server
- List the files and directories found on the FTP server
- Retrieve the files found on the FTP server
- Disconnect from an FTP server
Pocket FTPClient Mobile (WINDEV Mobile): Pocket FTPClient
[ + ] This example is an FTP client for Pocket PC.

This example enables you to view the content of an FTP server. It can also used to download files, to rename them or to delete them.
WM FTP Client Cross-platform examples (WINDEV Mobile): WM FTP Client
[ + ] This example is an FTP Client for Android and iOS.
It explains how to interact with an FTP server via the FTP functions of WLanguage.
It is used to:
- Rename files
- Delete files
- Create folders
- Download files
- Send files to the server
WD FTP File Transfer Complete examples (WINDEV): WD FTP File Transfer
[ + ] This example is a full FTP client allowing you to store several FTP servers. Then, you have the ability to perform multi-file transfers from the local computer to the server or from the FTP server to the local computer. To do so, we are using the standard functions of WLanguage (FTPConnect, etc.)
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment