Handle FTP Command?(編號:4118)

ftp 123.123.123.123
root
passward
cd /var/spool
put file
bye
前輩們,上面的方式傳檔到unix電腦時要如何來handle一連串的qa呢?