FTP scripting

Hello,

I'm sure this is an easy one for you UNIX pros. I would like to create and and automated an FTP process. The script should do this:

  1. Log into a remote system
  2. change to a specified directory
  3. copy local files to the remote system
  4. quit ftp
  5. wait until the next schedule

How can I get FTP to do with without user interaction?

Thanks.

Please Anyone?

I think you can get hint from the following example

syntax

ftp -s:test.scr

test.scr file conatins the following things

open <servername>
userid
password
cd /home/hypadm/ctl
prompt
mget *
bye

ftp with "-i" options disables interactive mode.

man ftp. Find out -i option

ftp -i <servername>

The -s option works in Windows, but not in UNIX. I tried that before I posted.

If you do a search of the forums on FTP Scripting you should find many useful examples. Also check out the FAQS section. To automate it you could use cron. Do a search on that and you should find the info you need.

I searched before I posted. "No results". Yeah, I couldn't believe it either.

Still couldn't find anything in search, but I got something to work.

sed s/File/File2/g <location of command file> | ftp -inv

ftp command file content:
open <server ip>
user username password
lcd /dir
cd /dir
type binary
mput *
quit

Thanks for the responses.