问题
I am trying to load a medium sized zipped archive (.zip file ~140 Mb) that can be found here (direct link) (source: Deutsche Bundesbank (website)). After downloading the file it is saved as "BKK-Download.zip". The file contains ~50.000s xml files with some rather strange names (such as "bbai3.q.de.n.v.bf90.f.kv.a1.s.2.n.e.z.xml") in three subfolders.
In a first step I try to open the "tree.xml" file in the "tree" folder, in a second step I will open the file using the XML package. I try the first step by using the unzip function:
f.path <- "path to the file"
dat <- unzip(paste0(f.path, "BKK-Download.zip"))
library(XML)
xml.content <- xmlParse(dat[1])
# for the case that "tree.xml" is the first xml-file
But instead, the unzip-command returns the following error:
Warning message:
In unzip(paste0(f.path, "BKK-Download.zip")) :
error 1 in extracting from zip file
If I try this with a test zip-archive with multiple folders and complicated file names (like the one mentioned above) everything works fine.
Any ideas why this error might occur?
来源:https://stackoverflow.com/questions/32785944/unzip-returns-error-1-for-a-zip-file-in-r