I have a password protected folder containing multiple files. This folder is in BOX. I am able to use the package boxr to download the folder to my computer. However, I am unsure how to use R to unzip this password protected folder. I need to provide the password and unzip this folder for further processing. I need to be able to do this using only R.
Asked
Active
Viewed 940 times
0
-
`utils::unzip()` does not support password protected zip files. See [this question and answers](https://stackoverflow.com/questions/37665451/unzip-password-protected-zip-files-in-r) for examples oh how to do it with `system()` calls. – Till May 14 '21 at 16:55
-
Does this answer your question? [Unzip password protected zip files in R](https://stackoverflow.com/questions/37665451/unzip-password-protected-zip-files-in-r) – stefan May 17 '21 at 08:06
1 Answers
0
If you have 7-Zip installed, you can use system("7z x YOUR_FILE.7z -pYOUR_PASSWORD")
. This passes the file name and password to the file, allowing you to unzip it.

mhovd
- 3,724
- 2
- 21
- 47
-
Is there a way to do it without installing any 3rd part software, not possible in our company laptops. I need to pass this code to other members, who will face the same difficulty. – rmrm May 14 '21 at 19:38
-
Do you not have any archival software on your work computers? 7Zip, WinRAR, etc? – mhovd May 14 '21 at 20:34