Note that if you wish to store the current directory into a string variable or use it in string expressions, then you can use variable GPVAL_PWD, see show variables all (p. ).