GRETL Scripting: Is it possible to user OPEN with a string variable without $workdir?

89 views Asked by At

So I'm doing a GRETL script where the users writes his Operating System (Windows/Linux), his path to a gretl workdir and the .gdt file to open (saved from a previous exercise).

This passes on string variables. One of such variables is gdt_file which before opening should be /path/to/file/file.gdt

Now, reading GRETL documentation, the open command will by default look for file.gdt inside the $workdir.

Now, what I want to do is open gdt_file, but of course it doesn't work because it's looking for gdt_file.gdt inside $workdir, instead of open /path/to/file/file.gdt

I've played a bit with it, but I'm unable to find a workaround, IDK if this is even possible, the documentation isn't very clarifying.

Thank you for your time.

1

There are 1 answers

0
Iagovar On

here's the thread with the reply from the Gretl team, in case anyone is wondering: https://sourceforge.net/p/gretl/bugs/247/

Basically, use command "@variable" as in string substitution in the gretl guide.