FTP_FileDownload

Downloads a file from a remote FTP Server

  • Stored Procedure
  • SQL Server Compatibility: 2008, 2012, 2014, 2016, 2017

Syntax:

EXEC SQLHTTP.net.FTP_FileDownload @URL, [@UserName], [@Password], @LocalFilePath, [@StatusCode], [@StatusDescription]

Arguments:

Name Type Description
@URL nvarchar(4000) Required. FTP address that includes the source file name.

 

@UserName nvarchar(200) Optional. Leave blank (NULL) for anonymous connections

 

@Password nvarchar(200) Optional. Leave blank (NULL) for anonymous connections

 

@LocalFilePath nvarchar(4000) Required. Destination file path for the downloaded file.

 

@StatusCode int Optional. Output Parameter. Numeric status of the response.

 

@StatusDescription nvarchar(MAX) Optional. Output Parameter. Status Description returned with the response.

Remarks:

Accessing the file system will be performed in the context of the SQL Server instance process. You can set SQL Server to run using a specific network account, or a Local System Account.

Sample Usage:

See Also: