![]() |
FTP Command Line (Scripting Multiple FTP gets)
Is it possible to automate FTP Gets via command line use of FTP and a script?
e.g. Code:
Today="`date +%y%m%d`"http://www.reallylinux.com/docs/autoftp.shtml but this didn't appear to work for me either, the username and password were not accepted. Any help greatly appreciated! Thanks, Scotty. |
It's possible. Just to make sure of something is your date format in the form of
Code:
070104 |
You could use curl or lftp. Both of which script pretty well.
|
It depends what the default FTP client is for your distribution. For instance, OpenBSD's ftp client allows for:
Code:
$ ftp -o Site.1.LocalFile.${Today} ftp://user:password@host/remoteFileCode:
$ man ftpIf the default FTP client isn't sufficient, there are some extremely flexible and powerful file retrievers such as curl and wget that can easily do what you describe (and a lot more). |
| All times are GMT -5. The time now is 03:31 AM. |