Ask a Question related to PERL Beginners, Design and Development.
-
Ned Cunningham #1
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
-
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... -
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... -
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... -
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... -
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... -
Paul Kraus #2
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
-
Paul Kraus #3
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
-
Ned Cunningham #4
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
-
Tim Johnson #5
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
-
Mike Flannigan #6
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



Reply With Quote

