|
David,
You will also have to use double quotes around the filenames since they
appear to contain embedded spaces.
Such as
x wzzip -a "c:\temp\b b\abcd" "c:\temp\a a";
if you insist on quoting the command (not necessary but allowed) you need
more quotes (two consecutive quotation marks (single or double) collapses to
a single quotation mark of the same type, when within a quoted string that
starts with the same type of quotation mark)
x "wzzip -a ""c:\temp\b b\abcd"" ""c:\temp\a a""";
--
Richard DeVenezia - SAS Macros and AF Tools
http://www.devenezia.com
"David Simmons" <DavidSi@KINKOS.COM> wrote in message
news:sb0ced35.019@kinkos.com...
> I'm trying to use winzip to zip some excel files from SAS using the X
statement as discussed below.
>
> One thing you can try is to have SAS shell out
to DOS using an X
> statement. You can then use command lines
statement supported by
> WINZIP 7 to create the zip file. For example,
the SAS statement
>
> X "WZZIP -a c:\test\myzip
c:\test\myfile.xls";
>
> will zip up the Excel file into a file named
myzip.zip. A couple of
> key issues. To use Winzip commands, the
WinZip Command Line Support
> Add-on (which the last time I checked was Beta
software) must be
> installed onto WinZip 7.0. I don't think
version WinZip 6 supports
> command lines. Both can be downloaded from
the WinZip website. Also,
> for the command to work as shown above, the
winzip folder location
> must be in your path statement (i.e. in your
autoexec.bat file). All
> this info is well documented in the Command
Line Support
> documentation.
>
> Mike Mumma
> Westat
>
> When I issue the command below, a black dos box blinks on the screen
> and that is all. I have added d:\program files\winzip to my autoexec
file. any ideas would be appreciated.
>
> X "winzip32 -a e:\loss prevention\April2001\ops10b e:\loss
prevention\April2001\ops10b.xls";
>
>
> David H. Simmons
|