Best way to configure, store and retrieve "preferences"

Hi,

Ive written a script for automating some of the tasks required by DVDAssist, and it works great for my particular setup where I’ve hardwired various paths and options into the script (which folders to recurse down, where the “Start the Movie.mov” file can be found for copying and so on).

I’d like to make it public and have a simple way of bootstrapping the important values, where the user has to select a few options to start with (mostly folder and file paths), and then subsequent runs will pickup that information. I’d also like users to be able to reconfigure the values as needed.

Can someone point me towards any useful fragments for doing this? I imagine two separate scripts (maybe 3?) could do this… One for storing the properties as “property” values and one for doing the actual run using them. Perhaps a third to “write” them into the first. I cant find an easy way to:
(a) load another script in the “same” directory as the current one (I keep having to explicitly give a full path)
(b) get the properties in one to be automatically applied to the current one’s namespace

I presume this is quite a common thing… :frowning:

On a related note, how can I ask for, and store, a list of folders (that may be in very different places on disk).

Thanks
Jonathan

Hi,

I tend to use the UNIX command defaults when I want to do this.

See this thread.

Best wishes

John M