[ale] How to Automate FTP ????

Eric Webb foobar at stargate.totalchaos.org
Mon May 24 06:22:22 EDT 1999


> Hi All,
>  well this is actually a help i need. I need to automate FTP to  a
> particular machine from my client an Windows NT
>  i want to upload data from this NT to a Unix box or an IBM S/390
> (mainframe) every 5 minutes ,but i am not able to automate the ftp to given
> IP address say for example i need to FTP data to 123.100.123.12 with a user
> id of 'xyz' and password 'abcd' with binary mode of transfer and a default
> directory of 'dir1' in the host. Any ideas??????
> Thanks.

I'm not sure how to automate the client side of things under NT.  However,
I do have experience with GETting and PUTting data from a Unix box onto a
Winders machine.  In one example, I'm running the FTP-Serv-U "daemon"
on a Win3.1 box (eww, I know, but UPS Online Pro doesn't run on '95 yet!).  

The Unix side has to be played with a bit since normal ftp clients under
Unix won't allow you to merely pipe a password into it for automation.
Instead, I throw everything into ~/.netrc file and chmod it to 700.  

Here's a different example .netrc, showing an automated upload from my
webcam to my ISP:

  [foobar at stargate] /root $ more .netrc
  machine ra1.randomc.com login <login> password <password> macdef
  init
  cd WWW 
  cd Foocam
  bin
  put FoocamHome.jpg
  quit



Eric






More information about the Ale mailing list