wwftp::FtpCommand

This method allows you to execute FTP commands against the server.

If you want to get a response from the FTP server you have to pass in a buffer parameter that will be able to hold the result from the transfer. The behavior of this function is tied to WinInet.DLLs use of the FTPCommand function. Please refer to the MSDN documentation to see what commands are supported.

o.FTPCommand(lcCommand, lcBuffer, lnSize)

Return Value

0 on success - WinInet error code on failure.

Parameters

lcCommand
The command string to execute against the FTP server.

lcBuffer
BUffer that will hold the result from the command. Note this buffer must be pre-sized to hold the response. Otherwise the response may be truncated.

lnSize
Out - returns the size of the buffer returned.

Example

oFTP = CREATE("wwFTP")
? oFTP.FTPConnect("www.west-wind.com")

lcResult = sapce(1025)
lnSize=1024
? oFTP.FTPCommand("LIST",@lcResult,@lnSize)
? lcResult

See also:

Class wwFtp (deprecated)

© West Wind Technologies, 2024 • Updated: 09/06/11
Comment or report problem with topic