If a zipped file contains a nested zipped file, this function will extract the parent zip, extract the nested zip follow the original structure, zips them back again with the nested zip now unzipped.

unroll_zip(x, keep_tmp = FALSE, overwrite = FALSE)

Arguments

x

parent zipped file, including path if needed

keep_tmp

do not remove the temporary extracted folder

new_name

new name for the zipped file, default to parent's original name

Details

There are options to keep the temp file for inspection, otherwise new zipped file will appear in the same directory, overwritten if the same output name was given.

If there is more than one level, apply again to the newly created zip.