FTP Function Reference

sFTPPull

FTP Function Reference

This function downloads a file from the remote FTP server to the local drive.

<DllImport("SapphireFTP.dll")> _
Public Function sFTPPull(ByVal sRemoteFile As String, ByVal sLocalFile As String, ByVal bOverWriteFile As Byte, ByVal lTransferType As Integer, ByVal lLicence As Integer) As Integer
End Function

Parameters

  sRemoteFile
    A string specifying the name of the remote file to retrieve.
  sLocalFile
    A string specifying the name of the new local file the remote data will be copied to.
  bOverWriteFile
    A byte indicating whether to overwrite an existing local file. Use FTP_OVERWRITE and FTP_DONT_OVERWRITE for this parameter.
  lTransferType
    An integer specifying how the function will handle the download. Use one of the following:
FTP_TRANSFER_UNKNOWN
FTP_TRANSFER_ASCII
FTP_TRANSFER_BINARY
  lLicence
    An integer specifying the licence number of the registered utility. If using in demo mode, enter 1234567890.

Return Values

  Returns a number indicating success or failure. If the operation was successful then the return value will be FTP_NO_ERROR. Use sFTPErrorText to get a string version of the error message.