From owner-freebsd-questions Mon Feb 17 12:52:22 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id MAA13821 for questions-outgoing; Mon, 17 Feb 1997 12:52:22 -0800 (PST) Received: from luke.cpl.net ([206.85.245.131]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id MAA13815 for ; Mon, 17 Feb 1997 12:52:20 -0800 (PST) Received: from localhost (shawn@localhost) by luke.cpl.net (8.8.5/8.7.3) with SMTP id MAA02495 for ; Mon, 17 Feb 1997 12:52:41 GMT Date: Mon, 17 Feb 1997 12:52:41 +0000 (GMT) From: Shawn Ramsey To: questions@freebsd.org Subject: Re: Automatic File Send (FTP) In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > I am trying to dispatch a file automatically to another server at a given > > time. The Cron scheduling is obvious, but what is not obvious is a > > practical way of invoking an FTP agent to do the transfer. What I am > > thinking of is the reverse of NCFTP's colon mode of file fetching (ie. > > ncftp site.name:file.name). The script will also have to send a user name > > and pwd. Accomplishing this is not at all obvious. Does anyone have > > suggestions? > > I've never used Expect, but I hear it's good for this sort of thing. > Perl is also an option. I once had a need to do this as well, and NcFTP2 worked great. All you gotta do is have it log in manually, and have a macro file to tell it what to do when its logged in. Then you just call it from CRON when you need it to transfer. This would be a much simplier and easier way of doing it than writing a perl or expect script. :)