Click to See Complete Forum and Search --> : FTP in a script


girl
04-04-2001, 07:38 PM
Hiya

I need some help people...heres the deal
I need to write a script that will allow me to ftp a file to another machine.
I am not sure of how to write the ftp steps into the script.
I have also seen that you can either send the username
and password in the script or use another process
where it will not send the username and password...
as to send it isn't very secure!
..but any help would be great!

thanx heaps!

cheers
girl
:)

demian
04-04-2001, 08:04 PM
The Tcl/Tk extension expect seems a good way to accomplish this. It was designed to automate interactive tasks. It might well be already installed on your system along with some documentation. Here's (http://ftp.cdit.edu.cn/pub2/linux/develop/Expect/expect_nist_gov.html) the homepage where you can find links to related docs and info on how to obtain it.

:eek: 400 posts!?! Guess it's time to go to bed :D

[ 04 April 2001: Message edited by: demian ]

John_Doh
04-04-2001, 08:25 PM
Install ncftp (do a search over at freshmeat). A part of the ncftp package is "ncftpput". Its a ftpclient made for uploading via scripts.
After installling do a "man ncftpput" and the rest should be easy.

TheGimp
04-04-2001, 09:43 PM
Unnatended Batch FTP 'How I did it' (http://www.linuxnewbie.org/cgi-bin/ubbcgi/ultimatebb.cgi?ubb=get_topic&f=12&t=000389)