Subscribe Bookmark RSS Feed

Open File Error

ravi_jmp

Community Trekker

Joined:

Nov 3, 2011

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
Solution

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

...

Open(dir1||files1[i]);

...

1 REPLY
Solution

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

...

Open(dir1||files1[i]);

...