Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Archive::Tar extract

by DrHyde (Prior)
on Apr 17, 2012 at 10:25 UTC ( [id://965478]=note: print w/replies, xml ) Need Help??


in reply to Archive::Tar extract

If I read the Archive::Tar documentation correctly, you're trying to extract files from libpst.tar.gz and then write each one in turn to file C:/extract/libpst.tar.gz. This is probably not what you want.

You may find it useful to run your script under strace (or whatever the equivalent is on Windows) so you can see what the underlying system calls are and what it's trying to do to what files.

Replies are listed 'Best First'.
Re^2: Archive::Tar extract
by gautamparimoo (Beadle) on Apr 17, 2012 at 10:43 UTC

    I am doing what is written in the documentation , ie extract archive files one by one to specified location but it is not writing to the specified location

      No, you are not doing what is written in the documentation. DrHyde is correct.

      The documentation shows: $tar->extract_file( 'name/in/archive', 'name/i/want/to/give/it' );

      Your code has this line though: $tar->extract_file($file, "C:/extract/$input"); # Extract $file to "C:/extract/libpst.tar.gz"

      If you change it to the following it might work better: $tar->extract_file($file, "C:/extract"); # Extract $file to "C:/extract"

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-04-19 21:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found