ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Communication / FTP functions
  • Downloading a file found on an FTP server
  • Downloading a file found on an FTP server
Downloading a file found on an FTP server
WINDEVWEBDEV - Server codeJavaAjax This example is used to download a file found on the FTP server onto the current computer. This example does not manage the progress of the transfer.
nConnection is int
nConnection = FTPConnect("ftp.cdrom.com", "GUEST", "")
IF nConnection = -1 THEN
Error("Unable to establish connection to the server")
ELSE
IF FTPGet(nConnection, "/autoexec.bat", "C:\Temp\") = True THEN
Info("Transfer completed")
ELSE
Error("The transfer failed")
END
END
Downloading a file found on an FTP server
WINDEVWEBDEV - Server codeJavaAjax This example is used to download a file found on the FTP server onto the current computer. This example manages the progress of the transfer.
ServerIP is string
nConnection is int
nConnection = FTPConnect(IPServer, "anonymous", "")
IF nConnection = -1 THEN
Error("Unable to establish the connection to the server")
ELSE
IF FTPGet(nConnection, "/Info.txt", "C:\Temp\", "FTPDownload") = True THEN
Info("Transfer completed")
ELSE
Error("The transfer failed")
END
END
PROCEDURE FTPDownload(tTotalSize, tTransferedSize)
Message("FTP transfer in progress: " + tTransferedSize + ...
" bytes received of " + tTotalSize + "total.")
RETURN True
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help