ftpdelete

ftpdelete is a command line tool that allows deletion of files on an FTP server without having to resort to piping commands into some other ftp client utility. It uses the stanard Perl Net::FTP package.

Download
The script (a single Perl file) is here. Adjust the she-bang-path to your perl executable according to your local installation (currently set to /usr/bin/perl), make it executable and put it somewhere in your $PATH under the name ftpdelete.
Synopsis
Usage: ftpdelete [-i] ftp://[user[:password]@]host/path/file (v1.0)
Defaults
If unset, user defaults to anonymous. If unset, password defaults to nobody@no.such.host.com.
Flags
The -i flag indicates that the actual result of the delete operation should be ignored. Use this when the file to be deleted may have been deleted otherwise.
Return values
 0 - OK
 1 - URL parsing error
 2 - Can't connect
 3 - Can't login
 4 - Can't delete
Related Stuff
Copyright

This code was written by me, Matthias Gärtner. It is freeware. Do with it whatever you want. Use at your own risk. No warranty of any kind.

Back to main page. Back to software page.


 
This page was last changed on May 2nd, 2004. © Matthias Gärtner 2004