in reply to Re: Path Of an extracted Files
in thread Path Of an extracted Files

I know that. But you can't give a specific path when doing this.
I tried it and it was giving me thsi error :
mkdir AFCUArchive::Zip::.: Invalid argument at C:/Perl/site/lib/Archive/Zip.pm line 1760

Replies are listed 'Best First'.
Re: Re: Re: Path Of an extracted Files
by chip (Curate) on Mar 11, 2004 at 18:04 UTC
    You can give a specific path, that's what the FM says, which you should R. Maybe you're giving an invalid path, which would explain why the mkdir() is failing.

        -- Chip Salzenberg, Free-Floating Agent of Chaos

      This is how i'm doing it :
      print "Y:\\autoupload\\Site_Dict\\Inbox\\$y\n"; $zip->extractMemberWithoutPaths($y,"Y:\\autoupload\\Site_D +ict\\Inbox\\"."$y");
      Oliver
        To quote the inimitable Klortho the Magnificent:

        THE ERROR MESSAGE! READ THE ERROR MESSAGE!

        The filename includes colons and that's not gonna work on Windows. It's not a problem with the directory, it's that $y includes invalid chars for Windows. C'mon, it's right in front of you.

            -- Chip Salzenberg, Free-Floating Agent of Chaos

        change that to:  $zip->extractMember($y,"Y:\\autoupload\\Site_Dict\\Inbox\\$y"); and it should work like a champ, assuming that $y has been basename()'d.

        From the perldoc:

        extractMember( $memberOrName [, $extractedName ] ) Extract the given member, or match its name and extract it. Retur +ns undef if member doesn't exist in this Zip. If optional second arg + is given, use it as the name of the extracted member. Otherwise, the internal filename of the member is used as the name of the extrac +ted file or directory. If you pass $extractedName, it should be in th +e local file system's format. All necessary directories will be created. Returns "AZ_OK" on success.
        Please note If you pass $extractedName, it should be in the local file system's format. All necessary directories will be created.

        - - arden.