On Sat, Jun 30, 2001 at 08:18:42PM +0100, Carmen Marincu wrote:
> Hi -
> I know that you can upload files in CGI.
> But I was wondering if it is possible to upload all the files contained
> in a given directory.
> Does anyone know or did that ?

perhaps you could hack this a bit to suit your purpose.
#! /usr/bin/perl

        use Net::FTP;
        my($local) = shift;
        my($remote);
        chomp($remote = `hostname`);
        $remote .= '-' . time . '.tgz';
        my($ftp) = Net::FTP->new("servernamegoeshere",
                Timeout => 30,
                Debug => 1);
        $ftp->login('yourusername', 'yourpassword');
        $ftp->binary();
        $ftp->cwd('/var/spool/video');
        $ftp->put($local, $remote);
        $ftp->quit()

--
Tim Thomas
www.remoteautomation.com

Reply via email to