Using compression on Win32 systems

Ask a Question related to PERL Beginners, Design and Development.

  1. #1

    Default Using compression on Win32 systems

    Hi all:

    Can someone please suggest to me a way to (compress,zip,archive) multiple files and then (uncompress,unzip,unarchive) them.

    I need to zip them to a CD then have them unzipped on a win32 system. I have looked at win32::compress and archive tar pm, but have not been able to find an example. I even have the PDK msi, but can not seem to find any examples on that either.

    What would be the right way to do this?

    I have used a system command in the past, but have not have 100% success on the installation.

    Any examples or direction would be greatly appreciated
    Ned Cunningham
    POS Systems Development
    Monro Muffler Brake
    200 Holleder Parkway
    Rochester, NY 14615
    (585) 647-6400 ext. 310
    [email]ned.cunningham@monro.com[/email]
    Ned Cunningham Guest

  2. Similar Questions and Discussions

    1. Compression
      Hi David, If your images are jpeg or png, then link them to the cast instead of importing them. Then place the linked files on the CD. The linked...
    2. PDF Compression
      Hi All, I need to write a custom code in JAVA which should be capable of handling the compression of pdf files. Any help would be highly...
    3. Compression?
      When exporting a pdf from Quark Xpress, should I use the compression (jpg/zip) if the file is to be printed? I have been using no compression but the...
    4. Dave Roth's site (Win32::AdminMisc, Win32::ODBC, etc.) not available.
      Does anyone know of an alternate method to contact Dave Roth (other then rothd@roth.net )? It appears that his entire domain is unavailable...
    5. Win32-PerfMon on Win32
      Windows 2000(SP4) ActivePerl 5.8.3 I found this escapade rather confusing, I'm warning you now. I cannot install this Win32-PerfMon module, I...
  3. #2

    Default RE: Using compression on Win32 systems

    [url]http://search.cpan.org/search?query=zip&mode=all[/url]

    Paul Kraus
    -----------------------
    PEL Supply Company
    Network Administrator
    > -----Original Message-----
    > From: Ned Cunningham [mailto:Ned.Cunningham@monro.com]
    > Sent: Thursday, February 05, 2004 9:50 AM
    > To: [email]beginners@perl.org[/email]
    > Subject: Using compression on Win32 systems
    >
    > Hi all:
    >
    > Can someone please suggest to me a way to (compress,zip,archive) multiple
    > files and then (uncompress,unzip,unarchive) them.
    >
    > I need to zip them to a CD then have them unzipped on a win32 system. I
    > have looked at win32::compress and archive tar pm, but have not been able
    > to find an example. I even have the PDK msi, but can not seem to find any
    > examples on that either.
    >
    > What would be the right way to do this?
    >
    > I have used a system command in the past, but have not have 100% success
    > on the installation.
    >
    > Any examples or direction would be greatly appreciated
    > Ned Cunningham
    > POS Systems Development
    > Monro Muffler Brake
    > 200 Holleder Parkway
    > Rochester, NY 14615
    > (585) 647-6400 ext. 310
    > [email]ned.cunningham@monro.com[/email]
    >
    > --
    > To unsubscribe, e-mail: [email]beginners-unsubscribe@perl.org[/email]
    > For additional commands, e-mail: [email]beginners-help@perl.org[/email]
    > <http://learn.perl.org/> <http://learn.perl.org/first-response>

    Paul Kraus Guest

  4. #3

    Default RE: Using compression on Win32 systems

    Do you read the perl docs? They almost always contain examples or the folder
    for the module will have example code as well.

    Paul Kraus
    -----------------------
    PEL Supply Company
    Network Administrator
    > -----Original Message-----
    > From: Ned Cunningham [mailto:Ned.Cunningham@monro.com]
    > Sent: Thursday, February 05, 2004 9:50 AM
    > To: [email]beginners@perl.org[/email]
    > Subject: Using compression on Win32 systems
    >
    > Hi all:
    >
    > Can someone please suggest to me a way to (compress,zip,archive) multiple
    > files and then (uncompress,unzip,unarchive) them.
    >
    > I need to zip them to a CD then have them unzipped on a win32 system. I
    > have looked at win32::compress and archive tar pm, but have not been able
    > to find an example. I even have the PDK msi, but can not seem to find any
    > examples on that either.
    >
    > What would be the right way to do this?
    >
    > I have used a system command in the past, but have not have 100% success
    > on the installation.
    >
    > Any examples or direction would be greatly appreciated
    > Ned Cunningham
    > POS Systems Development
    > Monro Muffler Brake
    > 200 Holleder Parkway
    > Rochester, NY 14615
    > (585) 647-6400 ext. 310
    > [email]ned.cunningham@monro.com[/email]
    >
    > --
    > To unsubscribe, e-mail: [email]beginners-unsubscribe@perl.org[/email]
    > For additional commands, e-mail: [email]beginners-help@perl.org[/email]
    > <http://learn.perl.org/> <http://learn.perl.org/first-response>

    Paul Kraus Guest

  5. #4

    Default RE: Using compression on Win32 systems

    Yes,
    I have looked and googled and searched aspn.

    Have not been able to find an example.


    Ned Cunningham
    POS Systems Development
    Monro Muffler Brake
    200 Holleder Parkway
    Rochester, NY 14615
    (585) 647-6400 ext. 310
    [email]ned.cunningham@monro.com[/email]

    -----Original Message-----
    From: Paul Kraus [mailto:pkraus@pelsupply.com]
    Sent: Thursday, February 05, 2004 9:59 AM
    To: Ned Cunningham; [email]beginners@perl.org[/email]
    Subject: RE: Using compression on Win32 systems

    Do you read the perl docs? They almost always contain examples or the folder
    for the module will have example code as well.

    Paul Kraus
    -----------------------
    PEL Supply Company
    Network Administrator
    > -----Original Message-----
    > From: Ned Cunningham [mailto:Ned.Cunningham@monro.com]
    > Sent: Thursday, February 05, 2004 9:50 AM
    > To: [email]beginners@perl.org[/email]
    > Subject: Using compression on Win32 systems
    >
    > Hi all:
    >
    > Can someone please suggest to me a way to (compress,zip,archive) multiple
    > files and then (uncompress,unzip,unarchive) them.
    >
    > I need to zip them to a CD then have them unzipped on a win32 system. I
    > have looked at win32::compress and archive tar pm, but have not been able
    > to find an example. I even have the PDK msi, but can not seem to find any
    > examples on that either.
    >
    > What would be the right way to do this?
    >
    > I have used a system command in the past, but have not have 100% success
    > on the installation.
    >
    > Any examples or direction would be greatly appreciated
    > Ned Cunningham
    > POS Systems Development
    > Monro Muffler Brake
    > 200 Holleder Parkway
    > Rochester, NY 14615
    > (585) 647-6400 ext. 310
    > [email]ned.cunningham@monro.com[/email]
    >
    > --
    > To unsubscribe, e-mail: [email]beginners-unsubscribe@perl.org[/email]
    > For additional commands, e-mail: [email]beginners-help@perl.org[/email]
    > <http://learn.perl.org/> <http://learn.perl.org/first-response>

    Ned Cunningham Guest

  6. #5

    Default RE: Using compression on Win32 systems


    Try looking for Archive::Zip




    -----Original Message-----
    From: Ned Cunningham [mailto:Ned.Cunningham@monro.com]
    Sent: Thursday, February 05, 2004 8:35 AM
    To: Paul Kraus; [email]beginners@perl.org[/email]
    Subject: RE: Using compression on Win32 systems


    Yes,
    I have looked and googled and searched aspn.

    Have not been able to find an example.


    Ned Cunningham
    POS Systems Development
    Monro Muffler Brake
    200 Holleder Parkway
    Rochester, NY 14615
    (585) 647-6400 ext. 310
    [email]ned.cunningham@monro.com[/email]
    Tim Johnson Guest

  7. #6

    Default RE: Using compression on Win32 systems


    Sending again to another e-mail address:


    It's no surprise you didn't find what you needed. The
    documentation on that module is poor, though not
    by a lack of trying by the author. He even created
    a FAQ later because of the confusion, but it didn't
    help me much either - I think due to version changes,
    but I'm not sure. I'm really surprised by the lack
    of examples on the web.

    I did happen to stumble across a solution - posted
    below. If you discover something cool with this
    module, please share with me. If you have further
    problems, feel free to contact me.


    Mike Flannigan


    ZIP:
    use warnings;
    use strict;

    use File::Find;
    use Archive::Zip;

    my $dir = 'c:/Copy2';

    my $zip = new Archive::Zip;

    find sub {
    ( my $name = $_ ) =~ m/.*(?=\.\w{3})/;
    return if -d;
    return if /Io\.sys/;
    return if /Msdos\.sys/;
    return if /.*\.zip/i;
    print "$name - $& \n";
    $zip->addFile($File::Find::name);
    $zip->writeToFileNamed("file.zip");
    } => $dir;

    __END__



    UNZIP:

    use strict;
    use warnings;
    use Archive::Zip qw(:ERROR_CODES);

    my $dir = 'C:/Copy2';
    my $zipfile = 'test.zip';

    chdir $dir or die "Cannot chdir $dir:$!\n";

    my $zip = Archive::Zip->new();
    die "Error reading $zipfile:$!" unless $zip->read( "$dir/$zipfile" ) == AZ_OK;
    $zip->extractMember($_) for $zip->members;

    __END__


    > Subject: RE: Using compression on Win32 systems
    > Date: Thu, 5 Feb 2004 11:35:27 -0500
    > From: "Ned Cunningham" <Ned.Cunningham@monro.com>
    > To: "Paul Kraus" <pkraus@pelsupply.com>, <beginners@perl.org>
    >
    > Yes,
    > I have looked and googled and searched aspn.
    >
    > Have not been able to find an example.
    >
    > Ned Cunningham
    > POS Systems Development
    > Monro Muffler Brake
    > 200 Holleder Parkway
    > Rochester, NY 14615
    > (585) 647-6400 ext. 310
    > [email]ned.cunningham@monro.com[/email]

    Mike Flannigan Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139