FTP directory listing showing seconds
sarah.reichelt at gmail.com
Sun Apr 11 19:44:15 EDT 2010
On Sun, Apr 11, 2010 at 6:30 PM, Pierre Sahores <psahores at free.fr> wrote:
> Hello Sarah,
> The first libURLSetFTPListCommand with the "NLST" param is used to force a
> preventive LibUrl vars state reset while the second one with the "LIST"
> param is used to do the job ! Not sure if this a real academic way to go but
> feet the needs i had (and still work as expected) to list the contents of
> one of my on-rev account subdirectories.
Thanks for this Pierre, but it still has the problem that Richard was
talking about with older files showing a date but no time.
Here is an example from some test files on my site:
-rw-r--r-- 1 troz troz 0 Oct 5 2009 test.html
-rw-r--r-- 1 troz troz 228 Mar 17 23:47 test.irev
Taking Jerry's advice to get listings via CGI, I came up with the
following irev script:
put $_GET["folder"] into tFolder
put shell("ls -l --full-time" && tFolder) into tList
delete line 1 of tList -- sum of file sizes
-- format display for web page (remove next line for CGI work)
replace cr with "<br />" & cr in tList
Applying this to the same files in my test folder, I get:
-rw-r--r-- 1 troz troz 0 2009-10-05 19:20:21.000000000 -0500 test.html
-rw-r--r-- 1 troz troz 228 2010-03-18 00:47:57.000000000 -0500 test.irev
Having the seconds to 9 decimal places is a bit excessive, but the
rest of the time data is really good, especially as it includes the
time zone of the server.
(The different time for the test.irev file is due to daylight-savings
changes not being displayed, but since the time zone is there, that
can be accounted for in conversions.)
More information about the Use-livecode