Where to put a text file?


#1

A few of the scripts that I use/share need to store some information between sessions. Right now, I have the scripts write a text file on the users’ computer. But, right now I have the text file written to the windows temporary folder because I don’t know where else to put it. And, really, I’m not sure I should just be writing a text file to users’ computers anyway - maybe there’s a better solution? Or at least a place to put it that is consistent between users?

peter


#2

Peter,
I am not sure how much information you are putting into the temporary text file, but you could try using the rhino notes. You can add to the notes section, allowing you to read/write and parse it like a string. Similar to what you are doing in the external text file. The benefit to adding to the document notes is when you open the file on another computer the notes will come along with it.

I am sure there is probably a better practice for storing text information, and there is always the unlikely possibility that someone tries to use the document notes and finds/edits all of your data.


#3

Thanks, but I need the data to be available to any document, though, so notes won’t really work. True that it would travel with the document, which could be nice, but I wanted to have the data available to any rhino document running on a specific machine. On the other hand, it would be nice if I could store a file in the cloud instead of on a computer, but I think that’s not going to happen any time soon.


#4

What about C:\Users\Public\Documents or something like that?

I’m not sure if as a low level user you can create your own folder in

C:\Users\<user>\AppData\Roaming

but that might be another place…

–Mitch