FTP listing using "libURLftpCommand"

Dave Cragg dave.cragg at lacscentre.co.uk
Tue Jan 19 02:42:02 EST 2010


On 19 Jan 2010, at 00:45, stephen barncard wrote:

> Thanks...this sort of works.....  the example needs to use the URL keyword
> though
> 
> put URL ("ftp://user:pass@host.com/directory/") into theListOfFiles
> 
> this does list ok, similar listing to the HTTP method, however the dates in
> the listing are not consistent.
> 
> drwxr-x---   21 sbarncar 99           4096 Dec 31 03:03 .
> 
> drwx--x--x   15 sbarncar sbarncar     4096 Jan 15 01:51 ..
> 
> -rw-r--r--    1 sbarncar sbarncar        0 Dec 30 12:06 .htaccess
> 
> drwxr-xr-x    2 sbarncar sbarncar     4096 Jul 11  2009 .smileys
> 
> drwxr-xr-x   12 sbarncar sbarncar     4096 Jun 20  2009 barncard
> 
> drwxr-xr-x    2 sbarncar sbarncar     4096 Dec 22 03:35 blasters
> 
> 
> Some directories have the year, and some just have the month and day. Is
> this just the way it is? The year is just not important?

This is the standard FTP way. Similar to what the "ls -l" command returns on Unix-like systems. The year is not shown if the modification date is within the last six months. Instead the time is shown. Either way, "word 9 of line x of whatever" will return the name of the file.

libUrl uses the LIST command internally for ftp directory listings (or NLST if you do as Jan suggested). It returns exactly what the server returns.

Cheers
Dave


More information about the use-livecode mailing list