Discuss this help topic in SecureBlackbox Forum

TElSimpleSFTPClient.DownloadFiles

TElSimpleSFTPClient     See also     


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


Downloads files by mask or regular expression.

Declaration

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

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

[Pascal]
    procedure DownloadFiles(const RemotePath, RemoteMask : string; const LocalPath : string; Mode : TSBFileTransferMode; CaseSensitive : boolean; CaseConversion : TSBCaseConversion; Recursive : boolean); overload;
    procedure DownloadFiles(const RemotePath, RemoteMask : string; const LocalPath : string; Mode : TSBFileTransferMode; CaseSensitive : boolean; CaseConversion : TSBCaseConversion; Recursive : boolean; DeleteFiles : boolean); overload;
    procedure DownloadFiles(const RemotePath, RemoteMask : string; const LocalPath : string; Mode : TSBFileTransferMode; CopyMode : TSBFileCOpyMode; CaseSensitive : boolean; CaseConversion : TSBCaseConversion; Recursive : boolean); overload;

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

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

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

Parameters

  • RemotePath - the path to remote files to be downloaded.
  • RemoteMask - the mask to match the remote files to.
  • LocalPath - local path to store downloaded files.
  • Mode - specifies what to do if the file with the same name already exists.
  • CaseSensitive - specifies whether filename matching [to mask] is case-sensitive.
  • CaseConversion - specifies whether case conversion must be applied to file names as they are downloaded.
  • 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.
  • CopyMode - specifies what should be done with the file after successful copying.

TSBFileTransferMode values:

TSBFileCopyMode values:

TSBCaseConversion values:

Description

    Use this method when you want to download one or more files from the server to the local disk (or to the virtual file system, when the appropriate file system adapter is set). The method uses PipelineLength and DownloadBlockSize to calculate the size of the chunks which are requested from the server. To specify the ASCII or the binary transfer mode, use the ASCIIMode property.

    Files are chosen by 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