Unzip file with unar instead of unzip

unar(
  zipfile,
  files = NULL,
  overwrite = TRUE,
  exdir = ".",
  password,
  encoding,
  force_directory = TRUE,
  no_directory = !force_directory,
  verbose = FALSE,
  more_flags,
  ...
)

Arguments

zipfile

similar to unzip, put in shQuote if there is space or special characters in the path, name.

files

same as above parameter

overwrite

similar to unzip

exdir

similar to unzip

password

unar only, zip password

encoding

unar only, defined encoding, autodetect if not given

force_directory

Always create a containing directory for the contents of the unpacked archive? By default, a directory is created if there is more than one top-level file or folder.

no_directory

Never create a containing directory for the contents of the unpacked archive (This should be used to have the same file path as list_zip.

more_flags

for unar, see man unar, not dupplicate what already here

...

extra args to unzip