Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^4: help with unraring

by gautamparimoo (Beadle)
on Apr 25, 2012 at 05:39 UTC ( #966992=note: print w/ replies, xml ) Need Help??


in reply to Re^3: help with unraring
in thread help with unraring

yes it is a multipart file. But the archive is not extracted to the given directory because of this error.

Also can you tell me how to process each extracted file one at a time such that one file is extracted and its contents are processed for a regex than the next one is processed in similar fashion and so on instead of just extracting in a single go?


Comment on Re^4: help with unraring
Re^5: help with unraring
by nikosv (Hermit) on Apr 25, 2012 at 08:22 UTC
    When you have a multipart file i.e
    test.part1.rar test.part2.rar test.part3.rar
    all parts form a chain.

    what it does is that when reading the first part test.part1.rar,it extracts all the file contents spanning all other parts but also scans the filenames for the rest of the parts so that in a batch job they do not get needelsy processed again since they have been already extracted;that is the caching process.

    The "error" you see simply means that it has already seen the other parts and so diregards their processing. That is not the cause of the file not being extracted. Post your code to check what you are trying to do

    Also can you tell me how to process each extracted file one at a time such that one file is extracted and its contents are processed for a regex than the next one is processed in similar fashion and so on instead of just extracting in a single go?

    unfortunatelly this cannot happen;everything has to uncompressed in one go

      My code is same as i have shown earlier

      use Archive::Unrar qw(list_files_in_archive %donotprocess process_file +); use IO::CaptureOutput qw(capture); my @files; { local ($stdout, $stderr); capture sub {list_files_in_archive( file=>"C:/perl2exe/For perl 5.10. +1/test.rar" ,undef)}, \$stdout, \$stderr; @files=map {/Archive contents : (.*)/ } split ("\n",$stdout); } foreach (@files) { print "file ",++$i," : ",$_,"\n"; } ($result,$directory) = process_file( file=>'C:/perl2exe/For perl 5.10.1/test.ra +r', password=>undef, output_dir_path=>"C:/extract/", ); } print "$result"; print "$directory";

      $result gives me the chain error

        paths in windows uses backlashes

        file=>"C:\\perl2exe\\For perl 5.10.1\\test.rar",
        output_dir_path=>"C:\\extract"

        ($result,$directory) = process_file( file=>"C:\\perl2exe\\For perl 5.10.1\\test.rar", password=>undef, output_dir_path=>"C:\\extract" );
        try and tell me

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://966992]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2014-09-15 05:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (145 votes), past polls