|
|
|
|
|
|
|
|
|
|
- Overview
- FTP
- How it works
- Use in WLanguage
- Relative path/Absolute path
- Secure FTP server: SFTP and FTPS
- 1. SFTP protocol
- 2. FTPS protocol
Manipulating files on an FTP server
FTP (File Transfer Protocol) is a protocol for transferring files from one computer to another. This protocol allows you to exchange files over TCP/IP or the Internet. On the Internet, thousands of file servers can be accessed via FTP. FTP servers host shareware or freeware software accessible to the public. WINDEV and WEBDEV include several WLanguage functions for managing files on an FTP server from your applications or websites.
How it works - In theory, you cannot connect to an FTP server without an FTP account and a password. Only users with an account and a password can access the server.
- However, most public FTP servers allow you to log in anonymously. In this case, you will need to enter your email address as your password.
To download files from an FTP server, simply access as an "anonymous user". To upload files to an FTP server server (e.g. to send HTML pages to your website), you need to enter a username and a password. WINDEV, WEBDEV and WINDEV Mobile include a series of WLanguage functions for manipulating files on an FTP server. To manipulate files on an FTP server, follow these steps: - Connect to an FTP server (FTPConnect).
- Send and retrieve files (according to the connection mode). For a passive connection, the WINDEV application or WEBDEV website must request authorization from the FTP server to manipulate the files on the FTP server. You can also:
- get the characteristics of the files located on an FTP server: attributes, size, etc, ...
- manipulate files on an FTP server: create or delete files, etc, ...
- list the files of a directory on the FTP server and run a procedure for each file found.
- Disconnect from the FTP server (FTPDisconnect).
Remarks: - You need to install the TCP/IP communication protocol and define an IP address.
- An FTP server must be installed and configured on one of the computers used for the transfer.
FTP functions cannot be used in the Android emulator. - You can connect to an FTP server:
- by passing all the necessary parameters to FTPConnect.
New in version 2026by manipulating a variable of type ftpConnection containing the various parameters of the FTP connection to be used.
Relative path/Absolute path Relative and absolute paths are very important concepts in an application that handles files via FTP. - A path beginning with a slash is considered an absolute path. This path is relative to the root of the FTP server (server-specific parameter).
e.g.: /pub/user/FIONA - If the path does not begin with a slash, it is considered a relative path, i.e. the path relative to the current directory on the FTP server. This current directory can be obtained or changed using FTPCurrentDir.
When connecting to an FTP site, the initial directory (the "base directory" of the user) is not necessarily found at the root of the FTP server. Therefore, we recommend that you use relative paths. Secure FTP server: SFTP and FTPS
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|