BookmarkSubscribe
Choose Language Hide Translation Bar
hutan2
Community Member

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

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

0 Kudos
1 REPLY 1
ms
Super User ms
Super User

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

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]);

0 Kudos