develooper Front page | perl.beginners | Postings from July 2003

FTP Login/commands

Thread Next
From:
LoneWolf@nc.rr.com
Date:
July 29, 2003 09:02
Subject:
FTP Login/commands
Message ID:
410-2200372291627665@M2W050.mail2web.com
I am trying to modify a script to automatically login to an FTP server and
LCD to a path and then CD to the path where the files are, then to download
the files.

I wrote this in DOS about 6 months ago and it works in conjunction with a
batch file (which calls the login/command file) but I am having problems
porting it to perl.  I have tried using a system call to call the ftp
program, but I can't get it to bring in the file.

sub get_files
{
 system 'ftp','-f:.ftplog','10.1.1.48';
}

#.ftplog file
------------------
login
pass
lcd /home/web/sales/info/
cd /u/dsk/ipo
pwd
verbose
prompt
bin
mget salesa*
pwd
quit



--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .



Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About