[R] directory of files in a zip file?

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Jan 7 07:03:58 CET 2009


On Tue, 6 Jan 2009, Spencer Graves wrote:

> Hi, All:
>     How can I get the list of files contained in a zip file?
>     "zip.file.extract" will extract a specific 'file' from 'zipname', but 
> how can I get the names of the files in 'zipname'?

Package Rcompression will I believe allow you to do this.  (An Omegahat 
package, with a Windows binary on CRANextras.)  R itself does not contain 
code to do so.

Another approach is to call system("unzip ....", intern=TRUE) and process 
the result.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list