I downloaded a zip file (20000101[1].zip) with following subfolder structure
\home\ftp\pub\account\lmp\20010101.csv.
Do yo guys have any idea how to extract the file 20010101.csv
.
Thanks.
I downloaded a zip file (20000101[1].zip) with following subfolder structure
\home\ftp\pub\account\lmp\20010101.csv.
Do yo guys have any idea how to extract the file 20010101.csv
.
Thanks.
If you want to read the csv
without extracting it (sometimes it's quite useful), assuming eg a folders structure like this one
l@np350v5c:~$ zipinfo foo.zip
Archive: foo.zip
Zip file size: 481 bytes, number of entries: 3
drwxr-xr-x 3.0 unx 0 bx stor 14-May-27 22:52 foo/
drwxr-xr-x 3.0 unx 0 bx stor 14-May-27 22:52 foo/bar/
-rw-r--r-- 3.0 unx 21 tx stor 14-May-27 22:52 foo/bar/asd.csv
3 files, 21 bytes uncompressed, 21 bytes compressed: 0.0%
... you can try unz
which creates a connection to a file inside a .zip
file
con <- unz(description="foo.zip", filename="foo/bar/asd.csv")
db <- read.csv(con)
close(con)
HTH, Luca