in reply to Re: net ftp recursive - rls and rdir
in thread net ftp recursive - rls and rdir

It isn't complicated if you add functionality incrementally. Have you gotten the code you have working with what we gave you so far? That will give you a list of the files in a text file. Then grep that list for the ones you want. Then you just need a function to ftp each file that grep returns.

Replies are listed 'Best First'.
Re^3: net ftp recursive - rls and rdir
by Anonymous Monk on Sep 11, 2012 at 03:10 UTC

    Hi Lotus,

    Yes I got the list of files in a text file. but the size of the file is 70 MB. Is there any way we can ignore specific files. I want to ignore .log files while doing rls. Will a OmitAll work?

    And regarding grep, I'm writing this Perl script in a windows system which FTPs files from Unix. So how do i give a grep function into the Perl file. Do I have to use any other package.

    This is a snippet of my output

    /home/prod/test/code

    /

    RxD_CLM_bteq_TEMP_LOAD_V20.sh

    /home/prod/test/code/BABW/logs

    /

    Agent_Totals_CO_Merced_FTP_20110122033155.log

      Hey guys

      got it. All to be done is to use the Matchfile parameter. Just add the filenames u want in an array and execute this :)

      foreach my $i (@array) { $f->rget(MatchFiles => qr/$i/) ; }