InfoConnect for Airlines VBA Guide
FTPReceiveFile Function
Specifies a local file. This string can be empty or can contain only the drive and path, in which case the host filename is used to generate a local filename. This string cannot contain wildcard characters.
Specifies a host file or files to be transferred. This string can contain wildcard characters (to transfer multiple files). The wildcard characters must be appropriate for the host system.
TransferTypeOption.ASCII: Specifies ASCII file transfer. InfoConnect applies the ASCII File Translation options (as specified on the Translation tab in the File Transfer Setup dialog box) to the data in the file as it is transferred. TransferTypeOption.Binary Specifies binary file transfer. Data in the file is not translated as it is transferred.
Specifies what to do if the file already exists on the host. The possible values are:

DestinationFileExistsOption.AskUser prompts the user to specify what should be done.

DestinationFileExistsOption.Cancel stops the transfer.

DestinationFileExistsOption.Update performs the transfer only if the host file is newer than the PC file.

DestinationFileExistsOption.Delete deletes (overwrites) the existing file.

DestinationFileExistsOption.Append appends the contents of the host file to the existing PC file.

DestinationFileExistsOption.Rename renames the file being transferred. The existing file retains the original name. The last three characters of the file being transferred are changed to 001. If such a file already exists, the file's name is changed to 002, and so on up to 999.

DestinationFileExistsOption.Skip skips the file (the transfer does not take place, but no error results).

Specifies a date and time. Only host files created or modified before the specified date and time are transferred.
Specifies a date and time. Only host files created or modified after the specified date and time are transferred.
Specifies one or more files to be excluded from a wildcard transfer. The filenames can include wildcards.
Transfers one or more files from the host to the PC using FTP (file transfer protocol).
Syntax
object.FTPReceiveFile( _
   ByVal localFile As String, _
   ByVal remoteFile As String, _
   ByVal transferType As TransferTypeOption, _
   ByVal fileExists As DestinationFileExistsOption, _
   ByVal before As System.Date, _
   ByVal since As System.Date, _
   ByVal exclude As String _
) As ReturnCode

Parameters

localFile
Specifies a local file. This string can be empty or can contain only the drive and path, in which case the host filename is used to generate a local filename. This string cannot contain wildcard characters.
remoteFile
Specifies a host file or files to be transferred. This string can contain wildcard characters (to transfer multiple files). The wildcard characters must be appropriate for the host system.
transferType
TransferTypeOption.ASCII: Specifies ASCII file transfer. InfoConnect applies the ASCII File Translation options (as specified on the Translation tab in the File Transfer Setup dialog box) to the data in the file as it is transferred. TransferTypeOption.Binary Specifies binary file transfer. Data in the file is not translated as it is transferred.
fileExists
Specifies what to do if the file already exists on the host. The possible values are:

DestinationFileExistsOption.AskUser prompts the user to specify what should be done.

DestinationFileExistsOption.Cancel stops the transfer.

DestinationFileExistsOption.Update performs the transfer only if the host file is newer than the PC file.

DestinationFileExistsOption.Delete deletes (overwrites) the existing file.

DestinationFileExistsOption.Append appends the contents of the host file to the existing PC file.

DestinationFileExistsOption.Rename renames the file being transferred. The existing file retains the original name. The last three characters of the file being transferred are changed to 001. If such a file already exists, the file's name is changed to 002, and so on up to 999.

DestinationFileExistsOption.Skip skips the file (the transfer does not take place, but no error results).

before
Specifies a date and time. Only host files created or modified before the specified date and time are transferred.
since
Specifies a date and time. Only host files created or modified after the specified date and time are transferred.
exclude
Specifies one or more files to be excluded from a wildcard transfer. The filenames can include wildcards.
Remarks
Use FTPStartServer to connect to the host server before using this method. Use FTPStopServer to disconnect from the host server after file transfer is complete.
See Also