Grasshopper

algorithmic modeling for Rhino

How can I change the location of the special folders?

By default, the GH configuration has the special folders located in AppData/Roaming.  I would like to change this for several reasons:

  1. Objects placed in these folders can be critical to my work (i.e. user modules) and they are not readily visible unless you go through the gh interface or know where to look for them.
  2. The roaming folder is not usually backed up other than by MS roaming profiles, which is poor for this type of usage.
  3. I want to have versioning via a service like OneDrive, Copy, or DropBox.  But because the files are located in Roaming this can't be done.
  4. I want to use the mentioned services to automatically sync my special folders to my other computers so I have access to the latest versions at all times, and in case one of my computers crashes (which it did recently.)
  5. If you do a reset on Win10, it keeps your user files in places like documents and such.  However, when you do that reset it completely wipes out the Roaming folder. So even though MS states your documents and files won't be touched during a reset, they are not referring to files i the AppData area.  That area gets wiped out and you loose the files there.

So.... anyway I can change this location?  Also, I would suggest changing the default location for GH special folders to some location in the documents folder, not in the AppData folder.

Views: 3086

Replies to This Discussion

Ok, so I had a little play with this. This is not so hard to do and a very good idea. I don't think you can easily change the location of the folder itsself, but you can of course "sync" it to another folder. There are several possibilities for this.

The first that comes to mind is using symbolic links (also known as symlinks). They are like a special kind of shortcut. Whereas a shortcut is a small file itself that links to another location, a symlink is a link that to the operating system and pretty much anything else is indistinguishable from the actual thing. That's why a certain care has to be taken with them, but they are used by the OS much more than might be obvious at first. I have used them on OS X a lot (and in fact all of Time Machine works almost entirely through the use of symlinks). There is a good article on how to use Symlinks easily on Windows as well, using the Link Shell Extension.

So once it's installed you can go to your Grasshopper folder in Roaming and pick it as the link source like so:

Then you change to a location in for example your Dropbox or wherever else you fancy. I have a folder inside my personal Dropbox (we use Dropbox for Business at work, thats why I have 2 Dropbox folders), there is a folder called Apps, which is used by all sorts of Apps that sync using Dropbox. So just right-click in there and create a symlink like so:

So now it will create the symlink and when you double-click it, it will contain the contents of your Grasshopper folder and start syncing:

Sure enough, after some uploading you now have your folder in Dropbox and continually updating:

I will leave this now and see how I get on, but it should be fine and shouldn't cause any issues. Now doing this the other way round, for example to sync the folder on a second computer, that might be another story as things like permissions start to come into play, although it should theoretically work. I have done similar things in the past with other software, but Dropbox is not the best in keeping permissions. Or rather in most cases you DONT want the permissions to stay the same, but for them to be changed to whoever the user is on a different computer and that does not always work as expected. But worth a try. I don't have another computer at hand to try this. On the other computer you would to the steps in opposite order and pick the folder in the Dropbox as the link source and then drop the symlink in the roaming folder (rename the Grasshopper folder that is already in there, so in case it doesnt work you can delete the symlink and rename it back to what it was).

This should theoretically also work with other cloud backups or a file server, but I have not tried those.

You can delete the symlink in the dropbox without problems and it will just delete the link. If you delete something in the Grasshopper folder inside the dropbox it will also be deleted in the roaming folder.

Disclaimer: No guarantees, do this at your own risk, backup your grasshopper folder just in case, be careful with symlinks and use them sparingly, take notes of what you are doing, especially when doing this on more than one computer.

I know on OS X there are several tools specifically for Dropbox that basically do exactly the same like MacDropAny, I am sure there is similar stuff for Windows.

Hey Armin, thanks so much for the reply.  I had thought about using SymLinks but was a little hesitant due to the way they are kinda "hidden" (unlike links).  I know they aren't really hidden, but is it difficult to tell what they are because there really isn't any obvious indicator on them, and either you have to manage them via command line or have a special tool.  Still, that might be the best way to handle this for now.

Another way I'm thinking of doing this is to set up a local file sync using something like FreeFileSync.  It would just monitor the Grasshopper folder and periodically sync the files to my cloud location (i.e. a folder in DropBox).  Then DropBox would take care of syncing to the cloud.

Ultimately what would be better would be to have a Grasshopper options setting that would allow a person to change the location of the Grasshopper special folders.

Again, thanks so much for the info.  I'm going to spend some time playing around with it.

Absolutely. I agree the folder should be located somewhere more sensible, like either in the Rhino folder or something like Documents, but I prefer the first option. After all Grasshopper is like a plugin for Rhino, so why not a subfolder in the application folder of Rhino. Again this could at least be a symlink.

I agree they are kind of hard to distinguish, which is why I usually add " - symlink" at the end of the name to be certain. Deleting the symlink is not problematic, but it can get confusing quite quickly.

There are many good syncing solutions, but carbon copy cloner and bittorrent sync are my favourites after trying many of them. Bittorrent sync is especially good to sync any folder between multiple computers. Its super easy to set up and very reliable (bittorrent has been around for ages). Have been using it to sync 2 servers between 2 office locations and its been running with no problems for several months - so worth checking out!

Good luck with your experiments and lets hope for GH2 and in light of the Mac version the folder is changed to something more sensible. The fact that you need a link to the special folder in the software means its in a bad place.

there is some other thing u can do... a File with the Extension .ghlink placed in a special folder...
its a Textfile, holding informations (paths) where gh looks for .gha to load... dont know if this works also for userobjects and so on...
ask google... I am on the phone right now...
Greets mark

Good idea and worth a try... I set it up with putting the .ghlink files with pointers in all of the special folders but it doesn't seem to work.  It doesn't look like GH pays attention to the .ghlink file for special folders e.g. user objects.

Ultimately I hope that the UI gets changed and that there is a simple path selection in preferences as to where to look for the files.

hm, is it working for the 'Libraries' folder?
I had some problems to get this work too...

Attached is a .ghLink-file which is working for me...
Note the backslash at the end of the path; u may forgot about it...

Attachments:

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service