Discuss this help topic in SecureBlackbox Forum

TElSimpleSFTPClient.UploadFiles

TElSimpleSFTPClient     See also     


Filter: C#  VB.NET  Pascal  C++  PHP  Java  


Uploads files by mask.

Declaration

[C#]
    void UploadFiles(string LocalPath, string LocalMask, string RemotePath, TSBFileTransferMode Mode, bool CaseSensitive, TSBCaseConversion CaseConversion, bool Recursive);
    void UploadFiles(string LocalPath, string LocalMask, string RemotePath, TSBFileTransferMode Mode, bool CaseSensitive, TSBCaseConversion CaseConversion, bool Recursive, bool DeleteFiles);
    void UploadFiles(string LocalPath, string LocalMask, string RemotePath, TSBFileTransferMode Mode, TSBFileCopyMode CopyMode, bool CaseSensitive, TSBCaseConversion CaseConversion, bool Recursive);

[VB.NET]
    Sub UploadFiles(ByVal LocalPath As String, ByVal LocalMask As String, ByVal RemotePath As String, ByVal Mode As TSBFileTransferMode, ByVal CaseSensitive As Boolean, ByVal CaseConversion As TSBCaseConversion, ByVal Recursive As Boolean)
    Sub UploadFiles(ByVal LocalPath As String, ByVal LocalMask As String, ByVal RemotePath As String, ByVal Mode As TSBFileTransferMode, ByVal CaseSensitive As Boolean, ByVal CaseConversion As TSBCaseConversion, ByVal Recursive As Boolean, ByVal DeleteFiles As Boolean)
    Sub UploadFiles(ByVal LocalPath As String, ByVal LocalMask As String, ByVal RemotePath As String, ByVal Mode As TSBFileTransferMode, ByVal CopyMode As TSBFileCopyMode, ByVal CaseSensitive As Boolean, ByVal CaseConversion As TSBCaseConversion, ByVal Recursive As Boolean)

[Pascal]
    procedure UploadFiles(const LocalPath, LocalMask : string; const RemotePath : string; Mode : TSBFileTransferMode; CaseSensitive : boolean; CaseConversion : TSBCaseConversion; Recursive : boolean); overload;
    procedure UploadFiles(const LocalPath, LocalMask : string; const RemotePath : string; Mode : TSBFileTransferMode; CaseSensitive : boolean; CaseConversion : TSBCaseConversion; Recursive : boolean; DeleteFiles : boolean); overload;
    procedure UploadFiles(const LocalPath, LocalMask : string; const RemotePath : string; Mode : TSBFileTransferMode; CopyMode : TSBFileCopyMode; CaseSensitive : boolean; CaseConversion : TSBCaseConversion; Recursive : boolean); overload;

[C++]
    void UploadFiles(const std::string &LocalPath, const std::string &LocalMask, const std::string &RemotePath, TSBFileTransferMode Mode, bool CaseSensitive, TSBCaseConversion CaseConversion, bool Recursive);
    void UploadFiles(const std::string &LocalPath, const std::string &LocalMask, const std::string &RemotePath, TSBFileTransferMode Mode, bool CaseSensitive, TSBCaseConversion CaseConversion, bool Recursive, bool DeleteFiles);
    void UploadFiles(const std::string &LocalPath, const std::string &LocalMask, const std::string &RemotePath, TSBFileTransferMode Mode, TSBFileCopyMode CopyMode, bool CaseSensitive, TSBCaseConversion CaseConversion, bool Recursive);

[PHP]
    void UploadFiles(string $LocalPath, string $LocalMask, string $RemotePath, integer $Mode, bool $CaseSensitive, integer $CaseConversion, bool $Recursive)
    void UploadFiles(string $LocalPath, string $LocalMask, string $RemotePath, integer $Mode, bool $CaseSensitive, integer $CaseConversion, bool $Recursive, bool $DeleteFiles)
    void UploadFiles(string $LocalPath, string $LocalMask, string $RemotePath, integer $Mode, integer $CopyMode, bool $CaseSensitive, integer $CaseConversion, bool $Recursive)

[Java]
    void uploadFiles(String LocalPath, String LocalMask, String RemotePath, TSBFileTransferMode Mode, TSBFileCopyMode CopyMode, boolean CaseSensitive, TSBCaseConversion CaseConversion, boolean Recursive);
    void uploadFiles(String LocalPath, String LocalMask, String RemotePath, TSBFileTransferMode Mode, boolean CaseSensitive, TSBCaseConversion CaseConversion, boolean Recursive);
    void uploadFiles(String LocalPath, String LocalMask, String RemotePath, TSBFileTransferMode Mode, boolean CaseSensitive, TSBCaseConversion CaseConversion, boolean Recursive, boolean DeleteFiles);

Parameters

  • LocalPath - local path to search for files
  • LocalMask - the mask to match the local files to
  • RemotePath - the path to store the files
  • Mode - specifies what to do if the file with the same name already exists
  • CopyMode - specifies what should be done with the file after successful copying.
  • CaseSensitive - specifies whether filename matching [to mask] is case-sensitive
  • CaseConversion - specifies whether case conversion must be applied to file names as they are uploaded
  • Recursive - specifies if the subdirectories should also be scanned for matching files
  • DeleteFiles - set to True to delete all files in the directory and its subdirectories after the files have been copied.

TSBFileTransferMode values:

TSBFileCopyMode values:

TSBCaseConversion values:

Description

    Use this method to upload one or more files from the local disk (or the virtual file system, when the appropriate file system adapter is set) to the server. The method uses PipelineLength and UploadBlockSize to calculate the sizes of the chunks sent to the server. To select the ASCII or binary transfer mode use the ASCIIMode property.

    Files are chosen by the mask which can be a simple mask, a set of masks or a regular expression (read more about masks).
    Since SecureBlackbox version 13, file masks in group operations support expressions.

    In case of error, EElSFTPError exception containing the SFTP error code, is raised. For more information on error handling, please read the corresponding how-to article.

Discuss this help topic in SecureBlackbox Forum