Need a way to download * (wildcard) via ftp in a script

Here’s a real need of mine, and I haven’t figured out how to do it on my own.

Is there ANY way to do a wildcard download via FTP from the command line? I’ve looked at ncftpget and wget and neither seems to have anything that works for me. Example of what I need:

Log into X IP address
using username Y and password Z
and download * (all)



wget --http-user=Y --http-password=Z http://X/ -r

This asumes that the server shows a directory listing when you use the IP address in a web browser.

See some examples here :

The idea is to use the FTP command, and give it some script on the standard input. This particular example does an mput (sends file to the server). You’ll want the mget command instead to get multiple files. The script should be pretty similar.

Try this:

wget -r ftp://user:password@server/some/path