<< back to sysax.com Product page |
The contents of a folder can be listed and stored into a user specified list name. Each item in the list can then be individually accessed. The ftpgetlist command can be used to obtain a listing of the current working path. The predefined keywords local or remote are used to specify either the local or remote system. The recurse level determines the number of levels of subfolders that need to be listed. If no recurse level is specified, it is set to 1 by default and lists only the top level files and folders in the current working path. Setting the recurse level to 0 will create a recursive listing of all subfolders in the current working path. A user specified list name is used to store the listing result. And the .count parameter is used to get the number of items in a list. And the The ftpresult
predefined status flag is set to the predefined constant success
if the command completed successfully.
Exhibit 3.1. Syntax of command for obtaining folder listings
ftpgetlist <keywords: local, remote>, <list name>, <recurse level>, <.count>; |
Exhibit 3.2. Example for using the command for folder listing
ftpgetlist local, @local_list; #get the listing of the current local working path ftpgetlist remote, @remote_list; #get the listing of the current remote working path ftpgetlist remote, @remote_list, 0; #get recursive listing of the current remote working path ftpgetlist remote, @remote_list, 3; #get up to 3 levels of listings of the current remote working path |