Complete.Org: Mailing Lists: Archives: discussion: August 1999:
Re: [aclug-L] Scropt help
Home

Re: [aclug-L] Scropt help

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: aclug-L@xxxxxxxxxxxx
Subject: Re: [aclug-L] Scropt help
From: Sanjay Dhar <sxdhar@xxxxxxxxxxx>
Date: Tue, 17 Aug 1999 08:49:46 -0500 (CDT)
Reply-to: aclug-L@xxxxxxxxxxxx


On Mon, 16 Aug 1999, Wayne White wrote:

> I would like to automate the uploading of a file to a ftp
> site with a script. 
> 
> I have worked out how to generate the file, but can't figure
> out how to connect to the ftp site, send username and password
> and then execute the commands to upload the file and disconnect.
> 
> I'm suspect that a shell script could handle this. I've been able 
> to script the connection, but how would you then get it to send
> the subsequent required informatin and commands.

You could disable the "auto-login option" for ftp by using the -n switch.

  ftp -vn hostname < ftp.put 

Here's a sample ftp.put (or whatever you want to call it)

user joe password
cd /some/remote/dir
binary
get somefile
put localfile
...... ( all your usual ftp commands go here )
......

quit


You can create your put file using some other script and make the whole
ftp process a cron job to suit your needs. Hope this helps.

----------------------------------------------------------------------------

      SANJAY DHAR

      sxdhar@xxxxxxxxxxx

      http://www.cs.twsu.edu/~sxdhar

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


[Prev in Thread] Current Thread [Next in Thread]