how to copy files from one Workspace to another Workspace? Also how to download images on my Workspace to my desktop? C9 only gives me the option of “Download a folder”, which I did. When I checked my desktop, it was a zipped folder & wouldn’t let me extract all the files in it. HELP!!!
Thank you for writing in. If the default download project doesn’t work for you, you should make an archive of the files you need to download manually using the terminal. So something like:
tar -zcvf archive-name.tar.gz directory-name
once that’s created, right click on the created archive within the file tree, and click on ‘Download’. That way all the required files are present in your archive, which you can then re-upload to another workspace.
Another way is to use a source control system like git to keep your code / assets in sync between workspaces and your local machine.
Hope this helps.
my workspace name is asdfff and I tried ~/workspace $ tar -zcvf archive-name.tar.gz asdfff
When I download a folder of archive-name.tar.gz, I got nothing files in there. How come?
I would like to download the folders name are client and views
Do you suggested me to do this tar -zcvf archive-name.tar.gz asdfff/client asdfff/views or what? I could not figure it out …
ironheartbj18:~/workspace $ ls
README.md client/ data/ mongod* node_modules/ package.json server.js views/
ah I found it was ~/workspace $tar -zcvf archive-name.tar.gz client views
It worked . It got me confused which one folder.
This is very inconvenient for quick updates… for example I have a private workspace that I work on code for my classes, and I don’t copy them over to my public workspace until they are ready to see it. Can I make a request for a real copy/paste capability?
Is there any reason you can’t just clone the private workspace and make it public? If that won’t work for you, you might be able to automate it somewhat by writing scripts to do most of the work for you. The simplest solution, in my opinion, would be to use
git with GitHub (if you’re a teacher, you might be able to get free private repositories, otherwise use GitLab, which has free private repositories), and then
git clone or
git pull the code on the target workspace.
GitHub is a good idea.