fireartist has asked for the wisdom of the Perl Monks concerning the following question:
What I expect it to look like:C: ->Windows ->Desktop ->Carl ->zip ->mysql backup ->sub-folder ->setup.bmp ->setup.exe
The script:backup ->sub-folder ->setup.bmp ->setup.exe
#!/usr/bin/perl use strict; use warnings; use Archive::Zip qw/ :ERROR_CODES :CONSTANTS/; use Archive::Zip::Tree; my $dir = 'C:\Windows\Desktop\carl\zip\mysql'; my $file = 'C:\Windows\Desktop\carl\test.zip'; my $name = 'backup'; my $zip = Archive::Zip->new(); $zip->addTree( $dir, $name ) == AZ_OK or die("could not add tree"); $zip->writeToFileNamed( $file ) == AZ_OK or die("could not write file");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Zip::Archive creates unwanted empty directory
by traveler (Parson) on Jul 26, 2002 at 21:44 UTC | |
by fireartist (Chaplain) on Jul 29, 2002 at 09:50 UTC |