From: Daniel Clarke - JAS Worldwide

> I'd like to suggest a feature for WGET:  the ability to download a file
> and then delete it afterwards.

   Assuming that you'd like to delete it on the FTP server, and not
locally, the basics of this seem pretty easy to add:

   0. Documentation.

   1. Some kind of command-line option to control the new
"source-delete" feature (or whatever you decide to call it).

   2. src/ftp-basic.c: Add a new function, ftp_dele() (very nearly
ftp_retr() converted to send "DELE" instead of "RETR", and to expect a
"2xx" success response instead of a "1xx").

   3. src/ftp.h: Add function prototype for ftp_dele().

   4. src/ftp.c: In getftp(), if ftp_retr() succeeds, and the new
source-delete option is enabled, call the new ftp_dele().

   5.  src/ftp.c: Add a bunch of new debug and error message code to
deal with ftp_dele() activity and failures.

   I've done steps 2, 3, and 4 in my experimental code, and the basic
functionality seems to be there.  If anyone is eager to do the whole job
and wants to see my rough code, just let me know.

------------------------------------------------------------------------

   Steven M. Schweda               [EMAIL PROTECTED]
   382 South Warwick Street        (+1) 651-699-9818
   Saint Paul  MN  55105-2547

Reply via email to