cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
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]);

...