Typing in the command \! pwd
will print the current working directory in psql.
To change working directory use command \cd <path>
; replace <path>
with desired path. Eg. Running command \cd /run/mount
will change the current working directory to /run/mount
. Try changing the your working directory to that containing the file which you want to run and then use \i
meta command as you did earlier. It will definitely work.