cURL / Mailing Lists / curl-users / Single Mail

curl-users

ftp listings

From: Shafeek P.S <shafeek_ps_at_yahoo.com>
Date: Wed, 3 Mar 2004 21:48:07 +0000 (GMT)

Hi,
          I have a problem while connnecting to ftp
site for listing of the files, when i do a listing
using -l im getting an html page instead of only
filenames.Is there any way to do the listing so that i
will get only filenames,otherwise i need to awk
through the HTML page to get the filenames,i think
doing this is not a generic solution,if the structure
of the html pages changes my script will go for a
toss,This is the script that i wrote this will connect
to network associate ftp site to list the latest DAT
files

$CURL/curl -v -U $PROXY_USER:$PROXY_PASSWD -x
$PROXY_HOST:$PROXY_PORT -Q "CWD
/pub/antivirus/datfiles/4.x/" -l "ftp://ftp.nai.com/"

<TITLE>Directory of
/pub/antivirus/datfiles/4.x</TITLE>
 <H2>Current directory is
/pub/antivirus/datfiles/4.x</H2>
 <PRE><HR>You are connected to ftp.nai.com.
Your use is subject to the terms and conditions
in Legal.TXT and Usage.TXT files.
*Mirror sites at FTPEUR.NAI.COM and FTPDE.NAI.COM*
<HR><A HREF="/pub/antivirus/datfiles/">Up to higher
level directory</A><BR> <A
HREF="/pub/antivirus/datfiles/4.x/43154316.upd"><IMG
ALIGN=absbottom BORDER=0
SRC="internal-gopher-unknown"> 43154316.upd</A>
     38 Kb Sun Jan 17 20:26:00 1904
<A
HREF="/pub/antivirus/datfiles/4.x/dat-4330.tar"><IMG
ALIGN=absbottom BORDER=0
SRC="internal-gopher-unknown"> dat-4330.tar</A>
   4030 Kb Mon Feb 29 15:52:00 1904
 <A
HREF="/pub/antivirus/datfiles/4.x/dat-4330.zip"><IMG
ALIGN=absbottom BORDER=0
SRC="internal-gopher-unknown"> dat-4330.zip</A>
   3488 Kb Mon Feb 29 15:52:00 1904
 <A HREF="/pub/antivirus/datfiles/4.x/delta.ini"><IMG
ALIGN=absbottom BORDER=0
SRC="internal-gopher-unknown"> delta.ini</A>
      1 Kb Mon Feb 29 15:52:00 1904
 <A HREF="/pub/antivirus/datfiles/4.x/readme.txt"><IMG
ALIGN=absbottom BORDER=0
SRC="internal-gopher-unknown"> readme.txt</A>
     47 Kb Sun Feb 28 20:32:00 1904
 <A
HREF="/pub/antivirus/datfiles/4.x/sdat4330.exe"><IMG
ALIGN=absbottom BORDER=0
SRC="internal-gopher-unknown"> sdat4330.exe</A>
   5668 Kb Mon Feb 29 15:52:00 1904
 <A HREF="/pub/antivirus/datfiles/4.x/update.ini"><IMG
ALIGN=absbottom BORDER=0
SRC="internal-gopher-unknown"> update.ini</A>
    748 bytes Mon Feb 29 15:52:00 1904
</PRE>

Can anyone help me in sorting out this problem?

Thanx in adavance

With Regards,

Shafeek

________________________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.html
Received on 2004-03-03