Download project as zip file


#1

I know you can open a downloaded file on your local machine using

tar -xzf downloaded_file.tar.gz or with winzip etc

but .tar.gz is not a familiar file type for windows users. Is there a way to force the download option to download in zip format or can that be done from the command line in cloud9?

@harutyun you are my best bet for a fast answer.

I am making some fairly awesome bash files for use in cloud9. My best one is at https://github.com/hpssjellis/bash-android-cloud9/blob/master/setup.sh have a look, does a lot.

Most of it will be replaced when cloud9 makes it’s Android-SDK docker file active.


#2

You can zip a file with zip -r file.zip folder/ . .tar.gz is just a gzipped tarball that is a native archive to linux. It can be opened with 7zip and probably others. You’ll still be left with finding an option to host the file for you to download. Perhaps a simple python http server running in a downloads folder. :slightly_smiling:


#3

@jerteach currently folders can be downloaded only as tar.gz https://github.com/c9/core/blob/master/plugins/c9.vfs.server/download.js#L83

I am not sure if something can be done from command line, it probably depends on your usecase but from setup.sh i didn’t understand how you are going to use it.


#4

Good idea about the server to help with downloads.


#5

I want to be able to easily download the users folder made using my setup.sh file as a zip to be viewed on a windows computer, however it just occurred to me that interactively connecting cloud9 with a github site is probably a better approach. I will research it and reply if I still need help.


#6

As an alternative, you can follow what @jms1989 said and then download just that file. Individual files are downloaded as is, while folders are compressed. Downloading an individual .zip file will do so as is.


#7

Nice. I used

zip -r my-www.zip ~/workspace/www

to just backup my www folder with the .zip extension. Students can then right-click on that file to download it as a zip to be extracted on a windows machine as a backup.

Thanks for the tip.


How to clone a workspace from a free to a paid account