ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Communication / FTP functions
  • Timeout
  • Rights of users
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Gets or sets the current directory on an FTP server (File Transfer Protocol).
New in SaaS
A new syntax for manipulating variables of type ftpConnection is available from WINDEV Suite SaaS 2025 - Update 2.
// Connect the current computer to the FTP server
ConnectionNumber = FTPConnect("192.54.12.8")
// Identify the current directory on the FTP server
ResCurrentDir = FTPCurrentDir(ConnectionNumber)
New in SaaS
WINDEVJavaUser code (UMC)
// Syntax not available in PHP
// Connect the current computer to the FTP server
MyFTPConnection is ftpConnection
MyFTPConnection.Server = "192.54.12.8"
FTPConnect(MyFTPConnection)

// Identify the current directory on the FTP server
ResCurrentDir = FTPCurrentDir(MyFTPConnection)
Syntax

Getting the current directory Hide the details

<Result> = FTPCurrentDir(<FTP connection>)
<Result>: Character string
  • Absolute name of current directory on the FTP server,
  • Empty string ("") if an error occurred. To get more details on the error, use ErrorInfo with the errMessage constant.
<FTP connection>: Integer or ftpConnection variable

Setting the current directory Hide the details

<Result> = FTPCurrentDir(<FTP connection> , <New current directory>)
<Result>: Boolean
  • True if the current directory was modified,
  • False otherwise. To get more details on the error, use ErrorInfo with the errMessage constant.
<FTP connection>: Integer or ftpConnection variable
<New current directory>: Character string
Name and full (or relative) path of new current directory. The different path sections are separated by "slashes" ("/").
Remarks

Timeout

By default, all the FTP functions fail if the FTP server does not respond within 20 seconds. This time can be modified:

Rights of users

Only a user who has read rights on the FTP server can get information about the files or the directories located on an FTP server. In most cases, the read rights are granted to the "anonymous" users.
Business / UI classification: Business Logic
Component: wd300com.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 04/25/2025

Send a report | Local help