Leif B. Kristensen writes: > So, the problem is solved, sort of. It may also be prudent to save the > old pwd and return there when the work is done: > > leif=> \set olddir `echo $PWD` > leif=> \set importdir `echo $IMPORTDIR` > leif=> \cd :importdir > leif=> \i test.sql > leif=> \cd :olddir You can concatenate values using \set. So using \set importfile :importdir /test.sql \i :importfile you won't have to mess with $PWD. regards, Andreas ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to majordomo@xxxxxxxxxxxxxx)