Reverse FTP

Hi Everybody,

I want to write a script in unix which will automatically FTP a .txt file from my client machine D: drive(Windows)

That is I want to FTP a file from my PC to UNIX box but this should be done from UNIX box by a shell script. (i.e. I will invoke the script in UNIX and FTP will be done)

Let me know if I have made this clear ? Any help would be appreciated.

$!/bin/ksh

ftp <destination machine ID> <<END_SCRIPT
cd <whatever directory>
get <filename>
quit
END_SCRIPT

Thank you awk.

For that on our systems, we have a .netrc (do man on netrc to see what the file format is) that has the machine/user/password information in there.

If you don't have that capability - put the user id/password in the script as the first line after the ftp
user <userid> <userpassword> # to do the logon the remote machine

good luck

I dont get you awk.

Becoz I have to get the file from my D: drive of my client PC which is on Windows. :confused: