FTP listing using "libURLftpCommand"
Jim Ault
jimaultwins at yahoo.com
Tue Jan 19 04:43:15 EST 2010
n Jan 19, 2010, at 12:35 AM, stephen barncard wrote:
> Thanks for responding, Dave. I get it now. Ok so I have to apply
> some kind
> of logic and recover the year.....(over the threshold)
> -- Stephen Barncard
I would strategize using a cgi stack to look a the folders that would
be local to it, therefore it can return the detailed info about the
drive it resides on.
Now you would ping an irev script, or a cgi, that returned what you
wanted in the format you wanted, including filtered lists and
directory walking (recursion).
I plan to do this in the next few weeks as my new project will be
uploading and moving files around on several web servers.
Of course I will also make a webPageThatShowsDirInfo.html (or .php)
for each server to document which folder/folder/files I have in order
to do batch updates and purges. I will probably add a button to the
page so that it will send me an email with its current data.
If you do this, it will be interesting to see your solution vs the
one I will be tweaking over the next couple years.
Jim Ault
Las Vegas
On Jan 19, 2010, at 12:35 AM, stephen barncard wrote:
> Thanks for responding, Dave. I get it now. Ok so I have to apply
> some kind
> of logic and recover the year.....(over the threshold)
> -------------------------
> Stephen Barncard
>
>
> 2010/1/18 Dave Cragg <dave.cragg at lacscentre.co.uk>
>
>>
>> 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