Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating zip file from folders

Tags:

r

I am wondering if it is possible to create a zip file from folders. I have one folder and in this folders there are four folders and in there, there are different kind of files. Now I want to zip those four folders recursively with their files.

I tried save() and gzip() but they don't do what I want.

Has someone a hint for me?

like image 438
Sarah West Avatar asked Jan 07 '11 10:01

Sarah West


People also ask

How do I convert multiple folders into a zip file?

Right-click on the file or folder. Select “Compressed (zipped) folder”. To place multiple files into a zip folder, select all of the files while hitting the Ctrl button. Then, right-click on one of the files, move your cursor over the “Send to” option and select “Compressed (zipped) folder”.

How do you zip a folder and upload it?

If you're on a PC using Windows, right-click the folder and in the menu that appears you should select Send to and then under that menu select Compressed (zipped) folder. You then should see a zip-file with the same name as the folder you created appear. You should upload this zip-file on the submission page.

Can Windows 10 create Zip files?

To select non-consecutive files or folders, hold down the Ctrl key as you select the individual files and/or folders. 2. Right-click on the file or folder (or group of files or folders), then point to Send to and select Compressed (zipped) folder.


1 Answers

Scope out the tar command. While it's not zip, a compressed tar file is just as good.

tarfile <- 'newfile.tgz'
tar(tarfile,'/path/of/dir/to/tar/up',compression='gzip')
like image 168
Jeff Avatar answered Oct 05 '22 23:10

Jeff