Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Aug 2000 14:16:14 +0000 (GMT)
From:      Fernando Gleiser <fgleiser@cactus.fi.uba.ar>
To:        Nathan Vidican <webmaster@wmptl.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: ftp upload from script
Message-ID:  <Pine.BSF.4.21.0008021404270.72880-100000@cactus.fi.uba.ar>
In-Reply-To: <398739CC.713D40B3@wmptl.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 1 Aug 2000, Nathan Vidican wrote:

> I need to have a script upload three files via FTP, is there anyway of
> doing this from a script? for example:
> 
> foreach $filename (@files) {
> 	system("ftp username:pass@ftp.wmptl.net/directory/to/ftp/to <
> $filename");
> }
> 

If you are using it in a perl script, you may try the Net::FTP 
module (available from the ports as part of p5-Net-1.0607).

to upload a file(stol^Wborrowed from the man page):
	
	use Net::FTP;

	my $ftp=Net::FTP->new("your remote host");
	$ftp->login("remoteuser", "remotepass");
	$ftp->put("yourfile");
	$ftp->quit;

Hope this helps


			Fer



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0008021404270.72880-100000>