Where did $zip come from?
Where did $NAME, $NAME1, $NAME2 come from?
What are the return values of all the addFileOrDirectory calls?
Please post a SHORT but COMPLETE script that demonstrates your errors.
Paul Lalli
Ok,The script on my Windows looks as following. I chdir to the
directory where all my files and folders to be zipped exist.Then I'm
calling a procedire ZIP as following :
&ZIP("Marksets ");
&ZIP("PrintConsole.reg");
.. . .
sub ZIP {
$NAME=shift;
$NEWNAME=shift;
warn "error zipping $NAME !!! $!" unless
$zip->addFileOrDirectory("$NAME") == AZ_OK;
}
The warning I get look like:
error zipping Marksets !!! at script/rehost.pl line 2159.
error zipping PrintConsole.reg !!! Bad file descriptor at
script/rehost.pl line 2159.
error zipping KDI-PGY2500_SysInfo.nfo !!! Bad file descriptor at
script/rehost.pl line 2159.
error zipping OS_PRINTERS !!! Bad file descriptor at script/rehost.pl
line 2159.
error zipping D:\Documents and
Settings\Administrator\Desktop\KDI-PGY2500_20061005_P3102_rehostsave.txt
!!! Bad file descriptor at script/rehost.pl line 2159.
(line 2159 is the one with the $zip->addFileOrDirectory("$NAME") ).
The zip file holds all files and folders,however all folders are empty.
Thanks