Send multiple files (or an entire directory structure) to the FTP server.
The files to be sent are specified by the sLocalFileMask parameter. Wildcards can be used as needed.
The files will be sent into the a folder on the FTP server that is specified by the sRemoteFolder parameter. The specified folder can be relative to the FTP server’s current working folder , can be an absolute path on the remote system, or can be left empty if you want the files to be sent to the FTP server’s current working folder.
When using this method, the library cannot inform you if any of the remote files already exist, but if any do exist, the bAppend parameter allows you to decide if the existing file should be overwritten by the new one being sent, or appended to.
For each folder scanned for matching files, the ScanningFolder event is triggered. For each file matched, the FileMatched event is triggered. When all the scanning is completed, for each file that will be transferred, the SendingFile event is triggered. If you write a handler for the SendingFile event, you can rename (or event relocate) each file by changing the sRemoteFilename parameter. Once the SendingFile event has triggered, the file is immediately sent and a series of FileTransferStatus events are triggered for this file, for each packet sent by the library.
The library creates remote subfolders as needed when sending entire directory structures.
This method can only be used when the CurrentState property's value is fcsConnected.
Parameter | Description |
---|---|
sLocalFileMask | Path and filename or file mask indicating the file(s) to send. |
sRemoteFolder | The folder on the FTP server to send the files into. |
bAppend | Set to True if you want to append to the file if it already exists. Set to False if you want to overwrite the file if it already exists. |
bProcessSubfolders | Set to True to recursively scan subfolders to find files that match sLocalFileMask, set to False to send only files directly located in the specified local path. |
Declaration | |
---|---|
|
AccountName, AllocateStorage, LocalDataAddress, LocalDataPort, PassiveMode, RemoteDataAddress, RemoteDataPort, RepresentationType
FileMatched, FileTransferStatus, LoggingCommandLine, ProcessCompleted, ScanningFoder, SendingFile