Need help with FTP scripts

Hi,

I'm using the following code to FTP files from a remote system.

ftp -inv <ip address> <<ENDFTP
user uname password
ENDFTP
echo "
binary
get <file name>
bye
" > ftp.tmp
ftp -inv < ftp.tmp

I want to know how I can capture the details of the FTP process in a file. I would also like to know if the ftp has happened successfully or it has failed. How can I do that in a script.
Any help in this regard will be of great help.

Thanks in advance.

Best Regards.
Nag

To keep the forums high quality for all users, please take the time to format your posts correctly.

First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags

```text
 and 
```

by hand.)

Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.

Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.

Thank You.

The UNIX and Linux Forums

ftp -inv $HOST > ftp.worked 2> ftp.failed <<EOF

Hi,
I want to transfer html files from windows server to unix server. Those files also have to be assigned proper permissions. Can u people suggest any ideas for this scenario?

Regards,
:b:Santhosh