Xbasic
FTP_GET_LIST Function
Syntax
File_List as C = FTP_GET_LIST(C address, C user, C password [, C path [, L NLIST]])
Arguments
- addressCharacter
The FTP address of the transmission.
- userCharacter
The user's identity.
- passwordCharacter
The user's password.
- pathCharacter
Default = "". The directory of the Address. The path of the directory to examine.
- NLISTLogical
Default = .F.. Defines the informatoin to list. If .T., the names of the files are retrieved. If .F., the owner, group, size, date, and name of files are returned.
Returns
- File_ListCharacter
Returns a list of files.
Description
The FTP_GET_LIST() function retrieves a list of files in a directory over a FTP connection.
The format of the directory listing varies from server to server.
Example
This example retrieves only file names.
dim fl as C
fl = FTP_GET_LIST("www.alphasoftware.com", "userid", "password", "/products/review", .t.)
? fl
= A1BookingScreen.jpg
A1ControlCentre.jpg
A1Invoice.jpg
Action_Script_ADO_ODBC_Data.jpg
Action_Script_View_Xbasic.jpg
...Example
The example retrieves file details. The entries are separated by space characters.
dim fl as C
fl = FTP_GET_LIST("www.alphasoftware.com", "userid", "password", "/directory/pagename", .f.)
? fl
= -rwxrwxrwx
1 owner
group
216541 Aug 18 11:18 A1BookingScreen.jpg
-rwxrwxrwx
1 owner
group
266488 Aug 18 11:18 A1ControlCentre.jpg
-rwxrwxrwx
1 owner
group
86652 Aug 18 11:18 A1Invoice.jpg
-rwxrwxrwx
1 owner
group
76308 Aug 18 11:18 Action_Script_ADO_ODBC_Data.jpg
-rwxrwxrwx
1 owner
group
65822 Aug 18 11:18 Action_Script_View_Xbasic.jpg
...See Also