Correct way to save zip file after replacing member?

Discussion in 'Perl Misc' started by david.karr, Apr 7, 2010.

  1. david.karr

    david.karr Guest

    I've written a short utility script to replace a member in a zip file,
    using the Archive::Zip module. After calling "updateMember()", I'm
    pretty sure I need to do something else to "finish" this, perhaps just
    writing the file out. Assuming my script has the original file name
    and the "Zip" object, what are the steps I should follow to write out
    this change to the original file name? I'm testing this on Cygwin,
    but it will need to work on Mac and Linux also (probably not an
    issue). I've read the Archive::Zip doc page, but I haven't seen
    anything that clearly says what I need to do here.
     
    david.karr, Apr 7, 2010
    #1
    1. Advertising

  2. david.karr

    Steve C Guest

    david.karr wrote:
    > I've written a short utility script to replace a member in a zip file,
    > using the Archive::Zip module. After calling "updateMember()", I'm
    > pretty sure I need to do something else to "finish" this, perhaps just
    > writing the file out. Assuming my script has the original file name
    > and the "Zip" object, what are the steps I should follow to write out
    > this change to the original file name? I'm testing this on Cygwin,
    > but it will need to work on Mac and Linux also (probably not an
    > issue). I've read the Archive::Zip doc page, but I haven't seen
    > anything that clearly says what I need to do here.


    From the doc, it looks like you want the overwrite method.
     
    Steve C, Apr 7, 2010
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    1,802
  2. HARI OM
    Replies:
    0
    Views:
    17,494
    HARI OM
    May 3, 2005
  3. abcd
    Replies:
    7
    Views:
    547
    Edward Elliott
    May 1, 2006
  4. majj81
    Replies:
    0
    Views:
    353
    majj81
    May 31, 2006
  5. Chris Lambacher

    Re: Add file to zip, or replace file in zip

    Chris Lambacher, Jun 1, 2006, in forum: Python
    Replies:
    0
    Views:
    648
    Chris Lambacher
    Jun 1, 2006
Loading...

Share This Page