Subscribe Bookmark RSS Feed

I would like to find JSL codes to open most recent file saved in folder. Would you help? thanks

hutan2

Community Member

Joined:

Jul 20, 2014

I would like to find JSL codes to open most recent file saved in folder.  Would you help? thanks

1 REPLY
ms

Super User

Joined:

Jun 23, 2011

In JMP 11 there is a function Last Modification Date() that should be useful here.

For example:

mypath = Pick directory();

files=files in directory(mypath);

{t,p}={0,1};

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

  ti = Last Modification Date( mypath || files[i] );

  If( ti > t, t = ti;  p = i)

);

Open(mypath||files[p]);