Subscribe Bookmark RSS Feed

Opening an executable file and passing data

waltp

Community Trekker

Joined:

May 15, 2012

I want to use the Open function to run a program (Gretl in this case; Gretl is a powerful free econometric package) and pass a data table to it. if I use

cmdString = "C:\Program Files\gretl\gretlw32.exe";

Open( cmdString );

where gretlw32.exe is the executable, Gretl opens perfectly. According to the Gretl developer, to tell Gretl to open with a data file (txt in this case), I should just use

cmdString = "C:\Program Files\gretl\gretlw32.exe c:\temp\conjoint3.txt";

Open( cmdString );

But now I get a message in the log that says

C:\Temp\C--Program Files-gretl-gretlw32.exe c--temp-conjoint3.txt was not found.

The text file is in its proper location. It seems that JMP does not like the second part of the string in the Open function. Is there a way to tell JMP to execute Gretl and read the text file? Is there a way to tell JMP that there's two parts to the string? What's wrong with the string I created?

Thanks,

Walt Paczkowski

2 REPLIES
blackeneth

Community Trekker

Joined:

Mar 6, 2013

Read the section on "File Paths" in Chapter 2 of the Scripting Guide. Perhaps the Convert File Path(), Set Path Variable(), and Get Path Variable() functions could help you.

dghidoni

Community Trekker

Joined:

Jan 23, 2012

another big problem is that the open instruction you used actually ignore anything after the first string.

read ALL this thread