Access to CWD value

Do Siril scripts have access to the working directory value? The value that was passed in the -d switch at call time?

I ask because I am using symbolic links to the darks/flats/biases directories as I share them among multiple lights. I’d like to just have symbolic links in each target’s directory. Because the built-in scripts use “cd …”, they don’t work with symbolic links. I’m hoping I can “cd $WORKING_DIR” or something instead.

I’m very new to Siril, so my apologies if this is something obvious.


Hello David, welcome.
Scripts start in the CWD passed either from the command line or from the settings stored by the GUI, or from the current directory if none was set at all.

Using the command cd at the beginning of scripts is optional and can be replaced by the -d /working/directory argument, it’s what I do to keep script generic, having only relative cd commands in them.

Thank you. What variable do I use to access the -d arg?

You don’t access it, the CWD is just changed to the passed value at the start, then you can make all cd commands relative in the script.