Script question: Is there a way to get back to a starting directory when a script started?

I’m writing a script to work across two disks for disk storage space sharing so I can stack several thousand lights without running out of space. My captured Lights/Biases/Flats from each night are on Disk C and when I process, I put the results on the larger Disk D in a defined “process” directory. To do this, I need to “cd” to disk “D:/Process” before stacking, but how do I get back to the starting directory on disk C as the home directory variable “~” only goes to my C:\users<username> directory. Is there some variable that contains the directory name for when the script is first executed, or do I need to use a hard coded source directory on Disk C?

you can use cd ~/whatever/dir/you/like and you can also make your script run from the current directory and specify the directory on the siril command line like siril -d d:\process -s ~/the_script.ssf for example

Thanks, I didn’t know siril had a “siril” command line command.

Also, what defines value of the ~" parameter?

~ is expanded to the user home directory, it’s a UNIX convention, on windows it’s equivalent to %USERPROFILE%

1 Like