I have a password protected zip archive containing several files. I want to unzip this archive and put the unzipped files into one specific folder.
I was able to unzip the archive, however the files in the zip archive were put into my working directory.
I know I could now move the files from there to my dedicated folder or even change the working directory to my desired output folder before unzipping, but I was wondering if and how I can specify an output folder/path/directory directrly in the command line command. I tried to simply add an output path to the command, which didn’t work.
Any ideas?
Here’s my code for extracting the files to my working directory.
password <- "abc"
system(command = paste0("unzip -o -P ",
password,
" ",
shQuote("C:/Users/User/testfile.zip")),
wait = TRUE)
(Let’s assume I would want to put the files into “D:/test/”)