I'm not aware of Windows FTP client having a similar functionality to the UNIX .netrc file (although I've been wrong before, just ask the wife :-).
I've always had my scripts store the user name and password in a secure file and constructed an equally secure command script on the fly, using the -n
and -s
option of ftp
, such as:
ftp -n -sgo.ftpcmds machine.com
and the go.ftpcmds contains (with suitable values of <username>
and <password>
):
user <username> <password>
ascii
get myfile.txt
quit
This allows me to automate all sorts of FTP tasks. If you want to automate logging in for an interactive task, just leave off the quit
at the end - it will leave you logged in.
I'm not sure I understand your comment on using FTP to log in and monitor log files - surely you'd be logging in with telnet and its brethren rather than using FTP for that purpose.