Using SFTP and FTP to transfer data from One Remote Server To Another

HI
I need to write a script in 415univ server which should go to 534unix server and move the files from there to windows server.

I am not able to get it bcoz sftp prompt is not allowing ftp command.

Can some one plz help me

Thanks in advance

sftp is not a shell. You can't type shell commands into it.

Try ssh, that is a shell.

Could you show what you tried? That'd give a better indication of what you want.

---------- Post updated at 11:52 AM ---------- Previous update was at 11:49 AM ----------

Something like this perhaps:

ssh 534unix <<EOF
ftp <<END
        <ftp commands>
END
EOF

betware that END and EOF must be at the beginning of the line with no spaces in front.

ssh ftp@UMW.com 
cd /FTP/test_ftp/SC/Outbound/
ftp -inv US.com <<EOF

user $SC_USER $Y5$
cd /RD/Out
ascii
mput *

when i run this script its moving into the sever as

bash-2.05$

and thats its no further execution

ssh doesn't automatically "eat" the lines below it. To feed lines into ssh, you must actually feed them into ssh, much like you feed them into ftp.

Try the code I actually gave you.