Lasso Soft Inc. > Home

[ FTP_GetListing ]

Method

[FTP_GetListing] lists all files accessible to the current user in the remote FTP server URL folder. Outputs each file entry as an array containing the file name, type (directory or file), modification date/time, and size in bytes (for files only).

Requires the first parameter: the URL of the folder to be listed.

Optional -Username and -Password parameters may be used to specifiy a username and password needed to log in to the remote FTP server. The username and password values often determine which files are shown by the FTP server.

Also optional is the -listonly and -options parameters. -listonly is a boolean, default false, and -options is an array of options to pass to the CURL command.

Returns an array of elements with the following named elements: filetype, filesize, filemoddate, filename

  • Syntax
FTP_GetListing(
    'ftp://ftp.example.com/private/', 
    -Username='my_username', 
    -Password='my_password',
    -listonly=boolean,
    -options=array
)
Examples
  • Beginner

To list all files available in a folder on a password-protected FTP server:

The following example lists all files in the ftp://ftp.example.com/private/ folder that are available to the username specified.

Code

FTP_GetListing('ftp://ftp.example.com/private/', -Username='Username', -Password='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 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft