Re: zip command in perl

2006-04-06 Thread Chas Owens
On 4/7/06, Irfan J Sayed <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I need to zip my backup dir. so that it will automatically convert my
> backup dir to backup.zip file
> can it be happen through perl ?
>
> Any sol. on this?
>
> Regards
> Irfan Sayed

Are you familiar with http://search.cpan.org?  It is a search tool for
Perl modules.

Take a look at 
http://search.cpan.org/~smpeters/Archive-Zip-1.16/lib/Archive/Zip.pod

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: zip command in perl

2006-04-06 Thread Irfan J Sayed
Hi Chas,

I downloaded the zip file from CPAN

But i am not getting one point

which command i should use in perl . i mean what is the syntax.
which module i should choose from that zip file after unzipping. (zip.pm 
?)

plz let me know.

Regards
Irfan Sayed

 



"Chas Owens" <[EMAIL PROTECTED]> 
04/07/2006 10:56 AM

To
Irfan J Sayed/India/[EMAIL PROTECTED]
cc
beginners@perl.org
Subject
Re: zip command in perl






On 4/7/06, Irfan J Sayed <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I need to zip my backup dir. so that it will automatically convert my
> backup dir to backup.zip file
> can it be happen through perl ?
>
> Any sol. on this?
>
> Regards
> Irfan Sayed

Are you familiar with http://search.cpan.org?  It is a search tool for
Perl modules.

Take a look at 
http://search.cpan.org/~smpeters/Archive-Zip-1.16/lib/Archive/Zip.pod



Re: zip command in perl

2006-04-06 Thread Chas Owens
On 4/7/06, Irfan J Sayed <[EMAIL PROTECTED]> wrote:
snip
> I downloaded the zip file from CPAN
>
> But i am not getting one point
>
> which command i should use in perl . i mean what is the syntax.
> which module i should choose from that zip file after unzipping. (zip.pm ?)
>
snip

The compressed file for the module is
http://search.cpan.org/CPAN/authors/id/S/SM/SMPETERS/Archive-Zip-1.16.tar.gz

You will need to download that and nmake
http://download.microsoft.com/download/vc15/patch/1.52/w95/en-us/nmake15.exe

run nmake15.exe
This will create a file named NMAKE.EXE
Put this file somewhere in your PATH

Decompress Archive-Zip-1.16.tar.gz (winzip should be able to do it)
open a cmd shell and change directory to uncompress Archive-Zip directory
type "perl Makefile.pl" (assuming perl is in your PATH)
type "nmake"
type "nmake test" (this is an optional step, but it is a good idea)
type "nmake install" (you may need admin privileges)

If everything went as planned the module will now be installed.  The
documentation for the module can be found here:
http://search.cpan.org/~smpeters/Archive-Zip-1.16/lib/Archive/Zip.pod

The basics (cribbed from the SYNOPSIS on that page) are:

use Archive::Zip qw( :ERROR_CODES :CONSTANTS );

my $zip = Archive::Zip->new();
$zip->addDirectory( 'D:\\backup' );
die 'write error' unless $zip->writeToFileNamed( 'd:\\backup.zip' ) == AZ_OK;

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: zip command in perl

2006-04-07 Thread Dr.Ruud
Irfan J Sayed schreef:

Please don't top-post.

> Hi Chas,

Try e-mail.

> I downloaded the zip file from CPAN

Why? If you are on Windows and run ActivePerl, do 

  C:\Perl> ppm

and wait for the ppm-prompt, then: 

  ppm> query Archive-Zip

  Querying target 1 (ActivePerl 5.8.7.813)
1. Archive-Zip [1.16] Provide an interface to ZIP archive files.

and you'll see that it is already installed. 


If you run a different perl, try 

  $ perl -MCPAN -e shell

and type help. You'll find install there.

-- 
Affijn, Ruud

"Gewoon is een tijger."

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: zip command in perl

2006-04-07 Thread Oliver Block
Am Freitag, 7. April 2006 07:15 schrieb Irfan J Sayed:

> I need to zip my backup dir. so that it will automatically convert my
> backup dir to backup.zip file
> can it be happen through perl ?

Why don't you use backticks?

btw: are you running perl on win32?

cu,

Oliver



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




RE: zip command in perl

2006-04-07 Thread Timothy Johnson
If you are running on Windows you can install Archive::Zip through PPM.

ppm install Archive-Zip



-Original Message-
From: Oliver Block [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 07, 2006 5:03 AM
To: beginners@perl.org
Subject: Re: zip command in perl

Am Freitag, 7. April 2006 07:15 schrieb Irfan J Sayed:



Why don't you use backticks?

btw: are you running perl on win32?





--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>