Hi,
I'm trying to create a ftp script so I can make an ftp connection and start upload and download files from/to remote servers.
In this case I want to start a connection (crontab) and transfer files from localserver1 to remoteserver; remoteserver to localserver1; finally from localserver1 to localserver2.
I changed the .netrc file and create the following entry:
# machine sample login userid password userpswd
machine (connection to IP address) login (username) password (password)
macdef init
passive
ascii
prompt
cd /pub/in
lcd /home/remoteserver/in
mget *
mdelete *
cd /pub/out
lcd /home/localserver1/out
mput *
bye
cd /home/localserver1/in
rcp * localserver2:/imp
rm *
cd /home/localserver1/out
rm *
Note: My OS is AIX 4.3i, if I start the connection manually it works fine but if I execute the complete script it stops after the connection with the remoteserver is closed and no files are transfer from localserver1 to localserver2.
Can someone help?