Lasso Soft Inc. > Home

[ ftp_getfile ]

Method

[FTP_GetFile] downloads a named file from a remote FTP server via PASV mode

The first parameter (required) is the URL to be fetched. This is the full path to the file, including the server name and path to the file.

The second parameter (required) is -file. This is the name and path to the file download destination.

Optional parameters include -username, -password and -options, an array of options to pass to the CURL process.

  • Syntax
FTP_GetFile(
    'ftp://ftp.example.com/myfile.zip', 
    -File='/folder/myfile.zip', 
    -Username='Username', 
    -Password='Password',
    -options=array
)
Examples
  • Beginner

To download a file from an FTP server:

The following example downloads a file named download.zip from ftp://ftp.example.com/private/donwload.zip where a username and password are required to access the Private folder.

Code

FTP_GetFile(
    'ftp://ftp.example.com/private/download.zip', 
    -File='/documents/download.zip', 
    -Username='my_username', 
    -Password='my_password'
)

Recent Comments

No Comments found

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2014 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft