cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
hutan2
Level I

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

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

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