cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Use World Cup data to build models, explore spatial relationships, and create informative visualizations in JMP. Register. July 17, 2 pm US Eastern Time.
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar

Open File Error

I have a JSL script (JMP 9) that works on csv files in a directory. The script works fine if its in the same directory as the csv files. It gives a 'unable to open file' error if its not in the same directory as the csv files. Can someone tell me what I am doing wrong?

Preview Text Error: Unable to open file.

Import Text: Unable to determine delimiters.

Tried to open: /M:/OV9760/xyz.csv

Cannot open table in access or evaluation of 'Open' , Open( files1 )

In the following script, error marked by /*###*/

dir1 = Pick Directory( "Select the folder where csv files are located" );

openDTs = {};

files1 = Files In Directory( dir1 );

start = Tick Seconds();

For( i = 1, i <= N Items( files1 ), i++,

    If( Ends With( files1, ".csv" ),

        Open/*###*/(files1);

         dt1 = Current Data Table();

-------------------------------------------------

1 ACCEPTED SOLUTION

Accepted Solutions
ms
Super User (Alumni) ms
Super User (Alumni)

Re: Open File Error

I think the directory is not remembered or implicit in Open(), i.e. the path has to be included.

...

Open(dir1||files1[i]);

...

View solution in original post

1 REPLY 1
ms
Super User (Alumni) ms
Super User (Alumni)

Re: Open File Error

I think the directory is not remembered or implicit in Open(), i.e. the path has to be included.

...

Open(dir1||files1[i]);

...

Recommended Articles