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

Stephen Quinn Barncard stephenREVOLUTION at barncard.com
Mon Oct 4 18:06:04 EDT 2004


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?



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
  <HEAD>
   <TITLE>Index of 
/content/TOURS/CSN2K4/_galleries/20040913_Pechanga/large</TITLE>
  </HEAD>
  <BODY>
<H1>Index of /content/TOURS/CSN2K4/_galleries/20040913_Pechanga/large</H1>
<PRE><A HREF="?N=D">Name</A>                    <A HREF="?M=A">Last 
modified</A>       <A HREF="?S=A">Size</A>  <A 
HREF="?D=A">Description</A>
<HR>
  <A HREF="/content/TOURS/CSN2K4/_galleries/20040913_Pechanga/">Parent 
Directory</A>        19-Sep-2004 23:18      - 
  <A HREF="PICT4661.jpg">PICT4661.jpg</A>            19-Sep-2004 23:16    46k 
  <A HREF="PICT4663.jpg">PICT4663.jpg</A>            19-Sep-2004 23:16    44k 
  <A HREF="PICT4664.jpg">PICT4664.jpg</A>            19-Sep-2004 23:16    52k 
  <A HREF="PICT4666.jpg">PICT4666.jpg</A>            19-Sep-2004 23:16    50k 
  <A HREF="PICT4668.jpg">PICT4668.jpg</A>            19-Sep-2004 23:16    57k 
  <A HREF="PICT4674.jpg">PICT4674.jpg</A>            19-Sep-2004 23:16    49k
  <A HREF="PICT4677.jpg">PICT4677.jpg</A>            19-Sep-2004 23:16    58k
</PRE><HR>
</BODY></HTML>

thanks in advance


More information about the use-livecode mailing list