Phoenix,

I'm not having any problem creating the zip file on the command line.
Here is what I have.

KIXTART 4.21
Windows 2000 SP3
IE 6.01
Winzip 9.0 beta
Winzip Command-line add-on 1.1 (for Winzip 9 beta)

Here is the full commandline used in a DOS Window:
(I don't have WZZIP.EXE in path so I use full path)

C:\PROGRA~1\WinZip\WZZIP.EXE -a -ex -rp "c:\files\thisdir.zip" "c:\files\exdir -v exdir\*.*"

Here is the listing of the files and directories I have.

quote:
C:\FILES\- V -ex -v
C:\FILES\- V -ex -v\egensock.cpp
C:\FILES\- V -ex -v\fgensock.cpp
C:\FILES\- V -ex -v\ggensock.cpp
C:\FILES\-v
C:\FILES\-v\Rebel
C:\FILES\-v\Rebel\Contents.txt
C:\FILES\-v\Rebel\Readme.txt
C:\FILES\-v\Rebel\Temp - V -v
C:\FILES\-v\Rebel\Temp - V -v\NSDSESS.TXT
C:\FILES\-v\moose.jpg
C:\FILES\Clients
C:\FILES\Clients\files.txt
C:\FILES\Compaq
C:\FILES\Compaq\NextGen
C:\FILES\Compaq\NextGen\IBM
C:\FILES\Compaq\NextGen\IBM\- v - ex -r -p -P -ee
C:\FILES\Compaq\NextGen\IBM\- v - ex -r -p -P -ee\-v
C:\FILES\Compaq\NextGen\IBM\- v - ex -r -p -P -ee\Copy of -v
C:\FILES\Compaq\NextGen\IBM\- v - ex -r -p -P -ee\Copy of sdk45y.txt
C:\FILES\Compaq\NextGen\IBM\- v - ex -r -p -P -ee\sdk45y.txt
C:\FILES\Compaq\NextGen\IBM\Bakegensock.cpp
C:\FILES\Compaq\NextGen\IBM\Bakfgensock.cpp
C:\FILES\Compaq\NextGen\IBM\Bakggensock.cpp
C:\FILES\Compaq\NextGen\egensock.cpp
C:\FILES\Compaq\NextGen\fgensock.cpp
C:\FILES\Compaq\NextGen\ggensock.cpp
C:\FILES\Compaq\fort.txt
C:\FILES\GENSOCK
C:\FILES\GENSOCK\gensock.cpp
C:\FILES\GENSOCK\gensock.h
C:\FILES\HP
C:\FILES\HP\-ex
C:\FILES\HP\-ex\snsock.cp
C:\FILES\HP\Copy of leftck.cpp
C:\FILES\HP\leftck.cpp
C:\FILES\Testing -v
C:\FILES\Testing -v\egensock.cpp
C:\FILES\Testing -v\fgensock.cpp
C:\FILES\Testing -v\ggensock.cpp
C:\FILES\exdir -v exdir
C:\FILES\exdir -v exdir\egensock.cpp
C:\FILES\exdir -v exdir\fgensock.cpp
C:\FILES\exdir -v exdir\ggensock.cpp
C:\FILES\files.txt

It created a single zip file with all folders.

I use the -ee switch because is creates a smaller file then -ex
that was the old highest compression switch, now it is -ee
I also use -rP (Capital P) to get the full path of directories in
the zip file as well.

I then modified the KiXtart file to use the new path
(not the same path you listed before) and re-ran the code.

I got the same error. That is because the quotes were not sufficient
to capture all of the information.

I modified the command line to this: (you don't need a space and - switch for each option
it can be supplied with a single - followed by multiple options.
shell 'C:\PROGRA~1\WinZip\WZZIP.EXE -eeorP "$archdir$filename.zip" "$basedir\$filename\*.*"'

This now produces the following files in the C:\ZIP folder:
- V -ex -v.zip
Clients.zip
Compaq.zip
exdir -v exdir.zip
GENSOCK.zip
HP.zip
Testing -v.zip
-v.zip

Each zip file contains all the files within its own folder and includes the FULL path.

Please retry the code EXACTLY as I've supplied and you should find it now zips up the files as expected.


break on
$basedir="c:\files"
$filename=dir("$basedir\*")
$archdir="c:\zip\"
WHILE ($filename <> "") AND (@error = 0)
IF ($filename <> ".") AND ($filename <> "..") AND (GetFileAttr($basedir+"\"+$filename) & 16)
shell 'C:\PROGRA~1\WinZip\WZZIP.EXE -eeorP "$archdir$filename.zip" "$basedir\$filename\*.*"'
ENDIF
$filename=dir()
LOOP
EXIT 0