QUESTION: How to get a remote directory file listing from a web site

Dave Cragg dcragg at lacscentre.co.uk
Tue Oct 5 02:33:15 EDT 2004


On 4 Oct 2004, at 23:06, Stephen Quinn Barncard wrote:

> Hello, I need some help.
>
> When I run this from the message box
>
> put  
> ("crosbystillsnash.com/content/TOURS/CSN2K4/_galleries/ 
> 20040913_Pechanga/large/") into thePath
> put "user:password" into userpass
> put "ftp://" & userpass & "@" & thePath into temp
> put  URL  temp
> put the result into tr
> if tr is not empty
> then
>    put "RESULT" && tr
> end if
>
> --- I get this error -
>
>
> RESULT error  550  
> /content/TOURS/CSN2K4/_galleries/20040913_Pechanga/large: No such file  
> or directory
>
> the URL is good; copied and pasted from a browser (this is my own site)
>
>
>
> Am I specifying the URL incorrectly? Is there a better way ? I just  
> need a simple listing.
>
> When I use it with URL http, I get html of course. Is the only way to  
> get an HTTP directory is by parsing the below?
>
It may be the "root" path for ftp is different to that for http.

For example, on OS X, the http path might look like this:

   http://"myserver.com/content/etc....

while the ftp path would look like this:

    ftp://user;pass@myserver.com/Sites/content/etc.

If you log the server's responses with libUrlSetLogField, you should be  
able to see the ftp server's "current working directory" in the logged  
data.

Cheers
Dave



More information about the use-livecode mailing list