cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Sign-in to the JMP Community will be unavailable intermittently Dec. 6-7 due to a system update. Thank you for your understanding!
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.
  • JMP 19 is here! Learn more about the new features.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
pcarroll1
Level IV

Can I include all the jsl files in a directory?

I'd like to have a directory of all my jsl functions but I don't want to have to include each file individually.  Is there a way to include all jsl files in a directory, (e.g. Include("C:...\Documents\JMPfunctions\*.jsl"); ).  Maybe just make and maintain a master file that includes all the functions and then include the master file?  Is there a more elegant way?

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
vince_faller
Super User (Alumni)

Re: Can I include all the jsl files in a directory?

I pretty much do what you said where I have a file that includes everything I need. 

 

Names default to here(1);
self_title = current window() <<  Get Window Title();
files = files in directory(".", recursive(1));
for(i=1, i<=nitems(files), i++, 
	if(endswith(files[i], ".jsl") & files[i] != self_title||".jsl", 
		include(files[i])
	)
);
Vince Faller - Predictum

View solution in original post

1 REPLY 1
vince_faller
Super User (Alumni)

Re: Can I include all the jsl files in a directory?

I pretty much do what you said where I have a file that includes everything I need. 

 

Names default to here(1);
self_title = current window() <<  Get Window Title();
files = files in directory(".", recursive(1));
for(i=1, i<=nitems(files), i++, 
	if(endswith(files[i], ".jsl") & files[i] != self_title||".jsl", 
		include(files[i])
	)
);
Vince Faller - Predictum

Recommended Articles