Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Undocumented zip/unzip capabilities of Stata 10


From   "Sergiy Radyakin" <serjradyakin@gmail.com>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: Undocumented zip/unzip capabilities of Stata 10
Date   Wed, 15 Aug 2007 13:43:52 -0400

Hello Statalisters,

I have just discovered two built-in undocumented commands in Stata 10
(at least in the Windows version) which might be of interest to the
public.

Syntax:

unzipfile ArchiveName.zip [Filename.ext ,overwrite password("mypassword")]
zipfile ArchiveName.zip Filename.ext [, overwrite
password("mypassword") level(#)]

where level's argument is a number between 1 and 9 (compression level)
if filename to extract is not specified, all files are extracted
-zipfile- can compress all files in a particular folder, just specify
the folder name instead of a filename. (this feature seems to be
non-recursive, so subfolders will not be archived). Other options are
self-explanatory.

The code seems to be based on the ZLib v1.01 library by Gilles
Vollant: www.winimage.com/zLibDll/

I wonder if anyone could confirm presence of these commands on other Platforms?
I wonder if anyone from Stata, Corp could confirm that target
directory to unzip is always the current directory. Is there any
option to get a list of files in a particular archive into a macro?

Best Regards,
    Sergiy Radyakin
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index