Re: Archive::Zip->addTree returned 2

2017-10-05 Thread Shlomi Fish
with the instructions there. > Archive::Zip > I am getting the following errors : > > patch_zip: /Location/patch1//patch1.zip Creating zip file > /Location/patch1//patch1.zip for apply pwd: The file access > permissions do not allow the specified action. A process terminat

Re: Archive::Zip->addTree returned 2

2017-10-04 Thread Andy Bach
2:56 PM, Asad <asad.hasan2...@gmail.com> wrote: > > Hi All > > I have perl script abc.pl and module abc.pm . When i execute abc.pl which > is using one the modules > > Archive::Zip > I am getting the following errors : > > patch_zip: /Location/patch1//patch1.z

Archive::Zip->addTree returned 2

2017-10-04 Thread Asad
Hi All I have perl script abc.pl and module abc.pm . When i execute abc.pl which is using one the modules Archive::Zip > I am getting the following errors : patch_zip: /Location/patch1//patch1.zip Creating zip file /Location/patch1//patch1.zip for apply pwd: The file access permissions

Re: How to append to a file in a Archive::Zip object ?

2016-10-24 Thread Vincent Lequertier
On 10/22/2016 06:56 PM, Eric de Hont wrote: > Op 21-10-16 om 14:13 schreef Vincent Lequertier: >> This code creates a zip file which contains several files, all named >> 'test'. The thing I'm trying to achieve is to have all the output of >> commands being appended to a 'test' file, into the zip.

Re: How to append to a file in a Archive::Zip object ?

2016-10-22 Thread Eric de Hont
Op 21-10-16 om 14:13 schreef Vincent Lequertier: This code creates a zip file which contains several files, all named 'test'. The thing I'm trying to achieve is to have all the output of commands being appended to a 'test' file, into the zip. How can I do this properly ? I mean without having

How to append to a file in a Archive::Zip object ?

2016-10-21 Thread Vincent Lequertier
Hello, I'm a bit stuck with Archive::Zip. I'm trying to find a clean way to append to a file inside a Archive::Zip object. See the code below: my $zip = Archive::Zip->new(); for my $master(@{$json}) { $config = qx /some command depending on $master/; $zip->addString($config,

Re: Can't find EOCD signature Archive::Zip

2014-12-07 Thread Mike Flannigan
FYI, Brandon McCaig set me straight that Archive::Zip is not designed to extract Unix gzip files. I then tried to use Archive::Tar, but it gave the error: Invalid header block at offset unknown at unzipgz.pl line 20 Error reading H.dat.gz: at unzipgz.pl line 20. I tried it on 2 different sets

Re: Can't find EOCD signature Archive::Zip

2014-12-07 Thread Omega -1911
Perhaps you could use: Archive::Extract #!/usr/bin/perl -w $| = 1; BEGIN {open (STDERR, error.txt); } print Content-type: text/html\n\n; use Archive::Extract; use CGI::Carp qw/fatalsToBrowser/; use File::Find; use Cwd; my $dir = cwd(); my $time = time; my $cnt = 0; my $who =''; my $ok = '';

Re: Can't find EOCD signature Archive::Zip

2014-12-07 Thread Natxo Asenjo
On Sun, Dec 7, 2014 at 3:41 PM, Mike Flannigan mikef...@att.net wrote: FYI, Brandon McCaig set me straight that Archive::Zip is not designed to extract Unix gzip files. in the standard Perl libraries you have IO::Uncompress::Gunzip which should do exactly what you require, I believe. http

Re: Can't find EOCD signature Archive::Zip

2014-12-07 Thread Mike Flannigan
Thank you so much. This one gives an error due to the GCC compiler not being installed. I'm not going to install that right now, but I am going to file this away for the future. I'm sure I will want to do this in the future. Thank you very much. Mike On 12/7/2014 9:29 AM, Omega -1911

Re: Can't find EOCD signature Archive::Zip

2014-12-05 Thread Brandon McCaig
Mike: On Thu, Dec 4, 2014 at 7:15 AM, Mike Flannigan mikef...@att.net wrote: This is a very old problem that apparently still persists. Some or all gzip files created on Unix can't be unzipped by Archive::Zip (1.38). There are tons of old posts from 2005 that mention this problem

Can't find EOCD signature Archive::Zip

2014-12-04 Thread Mike Flannigan
This is a very old problem that apparently still persists. Some or all gzip files created on Unix can't be unzipped by Archive::Zip (1.38). There are tons of old posts from 2005 that mention this problem, but apparently it is not an easy fix. Here is one link: http://www.perlmonks.org

Using Archive::Zip to compress two directories into a single zip file

2010-06-02 Thread Chap Harrison
Well, I suppose I've missed a subtlety along the way here. I have two directories: /path/to/existing/directory/foo/ /path/to/existing/directory/bar/ And I want to archive these two directories into a zip file named archive.zip. Here's what I did, using the synopsis of Archive::Zip in CPAN

Re: Using Archive::Zip to compress two directories into a single zip file

2010-06-02 Thread John W. Krahn
of Archive::Zip in CPAN as a guide: use Archive::Zip qw( :ERROR_CODES :CONSTANTS ); my $zip = Archive::Zip-new(); my $super_path = /path/to/existing/directory; my $dir_member; $dir_member = $zip-addDirectory( $super_path/foo/ ); # what should I do with $dir_member? anything

Archive::Zip library on Solaris

2010-01-25 Thread Bruno
Hello all, I have a Perl Script that uses some of the Archive::Zip's methods for reading zip entries. Works fine on Linux, BUT on Solaris, this lib is not available in Solaris and I'm not allowed to install any lib in it. Is there a way to load the archive::zip lib dinamically, without installing

Re: Archive::Zip library on Solaris

2010-01-25 Thread Jeff Peng
I have a Perl Script that uses some of the Archive::Zip's methods for reading zip entries. Works fine on Linux, BUT on Solaris, this lib is not available in Solaris and I'm not allowed to install any lib in it. Is there a way to load the archive::zip lib dinamically, without installing

Re: Archive::Zip library on Solaris

2010-01-25 Thread Shlomi Fish
the archive::zip lib dinamically, without installing it on the OS? You could download the module and install it by hand under your home directory. Then use lib '/path/to/module_dir' to include the directory in the scripts. Yes, see local-lib: http://search.cpan.org/dist/local-lib/ Regards

Re: Archive::Zip library on Solaris

2010-01-25 Thread Bruno
::Zip's methods for reading zip entries. Works fine on Linux, BUT on Solaris, this lib is not available in Solaris and I'm not allowed to install any lib in it. Is there a way to load the archive::zip lib dinamically, without installing it on the OS? You could download the module

Re: Archive::Zip library on Solaris

2010-01-25 Thread Shlomi Fish
On Monday 25 Jan 2010 15:28:11 Bruno wrote: And for uninstall it? Since I'm not allowed to alter the server, I have to remove the installed lib after using it Just delete ~/perl5/ or wherever you configured local-lib to install the code it installs. Regards, Shlomi Fish --

Re: Archive::Zip library on Solaris

2010-01-25 Thread Bruno
This lib is not available as default lib on v5.83 . I have to do everything considering the default installed libs. http://search.cpan.org/dist/local-lib/lib/local/lib.pm On Mon, Jan 25, 2010 at 11:57 AM, Shlomi Fish shlo...@iglu.org.il wrote: On Monday 25 Jan 2010 15:28:11 Bruno wrote: And

Re: Archive::Zip library on Solaris

2010-01-25 Thread Shlomi Fish
On Monday 25 Jan 2010 16:07:55 Bruno wrote: This lib is not available as default lib on v5.83 . I have to do everything considering the default installed libs. http://search.cpan.org/dist/local-lib/lib/local/lib.pm 1. The point of local-lib is that you download and install it from the local

Re: Archive::Zip library on Solaris

2010-01-25 Thread Bruno
Ok, so lets try. Hope it works. I know this version sucks... but unfortunatelly I don't have the power to decide which Perl version shall we use on our machines :-P , but my team will keep trying to convince the big guys to upgrade it. On Mon, Jan 25, 2010 at 12:26 PM, Shlomi Fish

Re: Archive::Zip library on Solaris

2010-01-25 Thread Alan Haggai Alavi
Hello all, I have a Perl Script that uses some of the Archive::Zip's methods for reading zip entries. Works fine on Linux, BUT on Solaris, this lib is not available in Solaris and I'm not allowed to install any lib in it. Is there a way to load the archive::zip lib dinamically, without installing

Re: CGI meets Archive::Zip

2007-12-10 Thread Gunnar Hjalmarsson
!) It creates an empty file with the correct name, but then dies. It also won't work using #!/usr/bin/perl -wT, but I haven't tried to sort that yet. Can anyone please point me in the right direction? It may be easier to do it in two steps: 1. Upload and save the zip file to disk without Archive::Zip 2

Re: CGI meets Archive::Zip

2007-12-10 Thread Tim Bowden
it in two steps: 1. Upload and save the zip file to disk without Archive::Zip 2. Manipulate the file to your liking That was my first approach, and it works fine (manipulating the zip file on disk using 'system unzip...;' etc), but I was looking to speed things up by avoiding unnecessary writing to disk

Re: CGI meets Archive::Zip

2007-12-10 Thread Gunnar Hjalmarsson
Tim Bowden wrote: On Mon, 2007-12-10 at 10:16 +0100, Gunnar Hjalmarsson wrote: It may be easier to do it in two steps: 1. Upload and save the zip file to disk without Archive::Zip 2. Manipulate the file to your liking That was my first approach, and it works fine (manipulating the zip file

CGI meets Archive::Zip

2007-12-09 Thread Tim Bowden
-data Zip file: INPUT TYPE=file NAME=zip_file/br/ INPUT TYPE=submit NAME=submit VALUE=Upload/ /form /body /html Perl cgi: #!/usr/bin/perl -w use CGI; use strict; use Fatal qw /open mkdir chdir /; use CGI::Carp qw(warningsToBrowser fatalsToBrowser); use Archive::Zip qw( :ERROR_CODES ) ; my @results

Archive::Zip and hash issues

2006-09-14 Thread Derek B. Smith
, 'bpjava\-usvc'= 25, ) Finally I have created a subroutine called zipit that uses Archive::Zip. I need to pass into this routine all the absolute path names (which includes the file 2 b zipped), but I am getting the raw hash data returned. archive zip call: Archive::Zip::DirectoryMember=HASH

Re: Archive::Zip and hash issues

2006-09-14 Thread Tom Phoenix
On 9/14/06, Derek B. Smith [EMAIL PROTECTED] wrote: my %subdir_for = ( 'bpjava\-msvc' = 23, 'bpjava\-susvc' = 24, 'bpjava\-usvc'= 25, ) Those backslashes aren't doing anything. But they aren't needed, either; hyphen isn't a special character in a hash key or single-quoted string.

Re: Archive::Zip and hash issues

2006-09-14 Thread Derek B. Smith
a curly. My main problem is trying to get Archive::Zip to work on many files under $oldir/$word/*. I can use qx(gzip) on $oldir/$word/*, but rather not. As as small test, I have exclude the hash translation in a sample file to just include one directory and two files with no avail. I used

Re: Archive::Zip and hash issues

2006-09-14 Thread Mumia W.
On 09/14/2006 09:20 AM, Derek B. Smith wrote: [...] sub zipit { ##-- Add all readable files below $oldir --## ##-- and write them into a file. --## my $zip = Archive::Zip-new(); my $entry = $zip-addDirectory ($oldir/$word/) or die Failed to add file for archive zip $!; $entry

Re: Archive Zip

2006-09-12 Thread Derek B. Smith
--- Tom Phoenix [EMAIL PROTECTED] wrote: On 9/11/06, Derek B. Smith [EMAIL PROTECTED] wrote: I need to compress a bunch of files, so instead of making a system call to gzip I figured to try out Archive::Zip. After running this code it creates a new file but is larger in size

Re: Archive Zip

2006-09-12 Thread Rob Dixon
Derek B. Smith wrote: --- Tom Phoenix [EMAIL PROTECTED] wrote: On 9/11/06, Derek B. Smith [EMAIL PROTECTED] wrote: I need to compress a bunch of files, so instead of making a system call to gzip I figured to try out Archive::Zip. After running this code it creates a new file but is larger

Re: Archive Zip

2006-09-12 Thread Derek B. Smith
--- Rob Dixon [EMAIL PROTECTED] wrote: Derek B. Smith wrote: --- Tom Phoenix [EMAIL PROTECTED] wrote: On 9/11/06, Derek B. Smith [EMAIL PROTECTED] wrote: I need to compress a bunch of files, so instead of making a system call to gzip I figured to try out Archive::Zip. After running

Archive Zip

2006-09-11 Thread Derek B. Smith
I need to compress a bunch of files, so instead of making a system call to gzip I figured to try out Archive::Zip. After running this code it creates a new file but is larger in size. How do I use archive zip to simply zip files so that they are generally smaller in size? thank you derek #!/usr

Re: Archive Zip

2006-09-11 Thread Tom Phoenix
On 9/11/06, Derek B. Smith [EMAIL PROTECTED] wrote: I need to compress a bunch of files, so instead of making a system call to gzip I figured to try out Archive::Zip. After running this code it creates a new file but is larger in size. That module automatically uses Compress::Zlib to compress

IO::Scalar and Archive::Zip

2005-07-24 Thread Gerhard Meier
Hi, I want to fetch a zip file from the net with LWP::UserAgent and then use Archive::Zip to manipulate it. But I don't want to store the zip file on the disk (if possible). This is where IO::Scalar came in. But it seems that Archive::Zip doesn't work together with IO::Scalar. Here is a litte

Help with Archive::Zip

2004-09-30 Thread dennis . gray
I have had limited success with using this package but do need some help. Here is my problem: I have a directory containing thousands of .zip files, each with a single text file. The archive files have the name in the format IMBFILE.zip, where is a sequence number. The

Move file from one zip to another using Archive::Zip

2004-05-19 Thread carl
Hola, How do I remove a file from a zip file and add it to a different existing archive? From the Archive_Zip documentation I understand that I'm clobbering the existing archives when i use the code below. How do I not clobber them? thank you. use Archive::Zip qw( :ERROR_CODES :CONSTANTS

Re: Move file from one zip to another using Archive::Zip

2004-05-19 Thread Wiggins d Anconia
Hola, How do I remove a file from a zip file and add it to a different existing archive? From the Archive_Zip documentation I understand that I'm clobbering the existing archives when i use the code below. How do I not clobber them? thank you. use Archive::Zip qw( :ERROR_CODES

data recovery ext3 (was RE: Recover zip file via Archive::Zip)

2003-08-14 Thread West, William M
While I'm still off topic and speaking of data recovery, has anyone every recovered data from a ext3 filesystem after all utilities have been tried to repair them? I've tried all the utilities off of freshmeat.net and nothing works. I've got bad blocks and i-nodes. Any suggestions are welcome

RE: Archive::Zip funnny return status

2003-08-14 Thread Dan Muey
in the traditional sense given the Archive::Zip module's strange return values? my $rc = $member-extractToFileNamed($unzippedfile); Ok here's what I've found. If I don't permission to create/write $unzippedfile $rc = 4 If it works I get $rc = 0 Any body know of any documentation

data recovery ext3 (was RE: Recover zip file via Archive::Zip)

2003-08-14 Thread West, William M
Hello everyone, __snipped stuff to do with zipped files___ While I'm still off topic and speaking of data recovery, has anyone every recovered data from a ext3 filesystem after all utilities have been tried to repair them? I've tried all the utilities off of freshmeat.net and nothing works.

Re: data recovery ext3 (was RE: Recover zip file via Archive::Zip)

2003-08-14 Thread Tassilo von Parseval
On Thu, Aug 07, 2003 at 03:09:06PM -0400 West, William M wrote: While I'm still off topic and speaking of data recovery, has anyone every recovered data from a ext3 filesystem after all utilities have been tried to repair them? I've tried all the utilities off of freshmeat.net and nothing

OT: Recover zip file via Archive::Zip

2003-08-14 Thread K Old
Hello everyone, I saw the discussion on Archive::Zip and wondered if anyone could help me out. I have a zip file that seems to be corrupted and I'm trying to get the data out of it. It's a 2GB file. I tried to run the extract.pl from Archive::Zip and it fails with the error below. I've tried

RE: Archive::Zip funnny return status

2003-08-10 Thread wiggins
with numeric operator with use strict. So if zero means it worked what means it failed\how can I tell if $rc means 1 or 0 in the traditional sense given the Archive::Zip module's strange return values? my $rc = $member-extractToFileNamed($unzippedfile); Ok here's what I've

RE: Archive::Zip funnny return status

2003-08-06 Thread Tim Johnson
If you do a perldoc Archive::Zip (I would print out a hard copy of the result, it's pretty long), you should get all of the error codes, methods, etc. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 9:44 AM To: Dan Muey Cc: [EMAIL

RE: Archive::Zip funnny return status

2003-08-06 Thread Dan Muey
in the traditional sense given the Archive::Zip module's strange return values? my $rc = $member-extractToFileNamed($unzippedfile); use Archive::Zip; ... my $member = $zip-memberNamed($zippedfile); my $rc = $member-extractToFileNamed($unzippedfile); if($rc =~ m/AZ_OK/) { print

Archive::Zip funnny return status

2003-08-05 Thread Dan Muey
use Archive::Zip; ... my $member = $zip-memberNamed($zippedfile); my $rc = $member-extractToFileNamed($unzippedfile); if($rc =~ m/AZ_OK/) { print ok -$rc-\n; } else { print Bad -$rc-\n; } The code above *always* prints: Bab -0- But $unzippedfile is created

RE: Archive::Zip funnny return status

2003-08-05 Thread Tim Johnson
. -Original Message- From: Dan Muey [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 05, 2003 2:32 PM To: [EMAIL PROTECTED] Subject: Archive::Zip funnny return status use Archive::Zip; ... my $member = $zip-memberNamed($zippedfile); my $rc = $member-extractToFileNamed

Question- Archive::zip/tar

2002-06-05 Thread Shishir K. Singh
Hello, I haven't tried it yet and wanted to know if anyone has the clue before I delve deeper into it (just being lazy :)). According to the documentation , the Archive::Tar module supports the *.gz format. I didn't find anything about *.Z (the compress format on UNIX). Does Archive::Tar

RE: Question- Archive::zip/tar

2002-06-05 Thread Beau E. Cox
Message- From: Shishir K. Singh [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 4:10 AM To: BeginnersPerl (E-mail) Subject: Question- Archive::zip/tar Hello, I haven't tried it yet and wanted to know if anyone has the clue before I delve deeper into it (just being lazy :)). According

RE: Question- Archive::zip/tar

2002-06-05 Thread Shishir K. Singh
format, the others work fine, thanks to Archive::Zip and Archive::Tar. The compress::Zlib does not support *.Z . After having a look at the source code for gzip, which is in C, found that *.Z(compression) is not supported, although *.Z(uncompression) is supported. I have no clue how to improvise

Re: Question- Archive::zip/tar

2002-06-05 Thread David T-G
Shishir -- ...and then Shishir K. Singh said... % % David --- % % Could have done that.Only problem with that is % % a) How do I uncompress the *.Z on non Unix(windows) without using gzip % exe (don't want to do that) Not sure. I dunno if the zlib module will speak uncompress or not.

newbie trying to zip files using archive::zip

2002-03-21 Thread Steven McCaffrey
Hello: I am trying to combine text files into a single zip file. I've seen the documentation for archive::zip and think this is close to what I need but am still unsure how to use it. I want to take file1.txt file2.txt file3.txt ...and output fileall.zip Any user friendly help

RE: newbie trying to zip files using archive::zip

2002-03-21 Thread Timothy Johnson
() method, and when you're done, output the result by using the writeToFileNamed() method. use Archive::Zip; use strict; my $zip = Archive::Zip-new(); my $zipname; if(defined $ARGV[0]){ $zipname = $ARGV[0]; }else{ $zipname = New ZIP

RE: newbie trying to zip files using archive::zip

2002-03-21 Thread Steven McCaffrey
Hi Tim: Thanks very much. You are a few days ahead of me. The only code I've seen at all is the documentation... snipet Archive::Zip - Provide an interface to ZIP archive files. NAME Archive::Zip - Provide an interface to ZIP archive files. SYNOPSIS use Archive::Zip qw( :ERROR_CODES