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

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

Replies are listed 'Best First'.
Re: Re: Re: Re: Path Of an extracted Files
by Zitoune (Beadle) on Mar 11, 2004 at 18:10 UTC
    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

        As much as I hate to rain on your parade, it appears* to only contains one colon, and that looks like it's specifying a drive path. Surely this should work in perl?

        * I say appears because I don't see where $y is defined, and it may contain a colon. But I can't tell.
      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.