Set the tmp directory of a Prolog program?

Hi, I think you’re looking for the tmp_dir Prolog flag:

tmp_dir(atom, changeable)

Path to the temporary directory. initialised from the environment variable TMP or TEMP in windows. If this variable is not defined a default is used. This default is typically /tmp or c:/temp in windows.

You can change this on the command line by adding e. g. -g "set_prolog_flag(tmp_dir, '/vol/share/phochste/tmp')" to your swipl call.

2 Likes