> I want to use ftp for downloading multiple files in
> perl-win32 system. I am working in ActivePerl.
>
> since I am working in Win2k, I am trying to write
> alternative to .netrc as below.
>
>
> my perl script calls a download.bat.
>
> The download.bat contains:
> ftp -s:ftpcmds.txt servertoaccess.com >> ftp.log
>
> and ftpcmds.txt has following ftp commands.
>
>
> anonymous
> [EMAIL PROTECTED]
> cd /datadir
> lcd C:\curr_data
> bin
> mget 20xx_jday_1[567]??_c[est].ext
> close
> bye
>
>
> where,
> xx =year
> day= day of year
>
> currently my script works if both xx and jday are
> fixed. I need to make them variables which gets value
> as arguement from original perl scripts. I couldn't
> figure out it.
>
> 1[567]?? specifies one of following time (hour minute)
> 15.??, 16.?? or 17.??
> c[est] for ce or cs or ct. Forget these parts, it is
> working well.
>
> My goal is to download all files that matches all
> conditions.
>
> Major question is passing year and jday as variable or
> argument. For this, If we could pass arguements along
> with ftpcmds.txt or write the whole code within perl
> script that will be great.
>
> Any solutions ?
>
>
> Thanks lot in advance.
>
> Raj

hi,

if you want to use the Win-FTP with a script, you're probably limited to the
standard wildcards (i.e. ? and *). IMHO, you're better off writing the whole
thing in pure perl by either using Net::FTP or Win32::Internet - both
provide 'list' methods, so you can first query a list of all available
filenames from the remote directory and than invoke the 'get' method on
every file which meets your conditions (using the appropriate regexp)

HTH
till


_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Reply via email to