cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
hs2021
Level I

Help with JSL file run method

Can I create a JSL which runs with the excel file stored in the same folder as the JSL file ? 

I have to analyze various output files, all of the output files are stored in different folders , but has the same columns and analyzing method.

Can I create a JSL file which when copied to the source folder and ran it runs the excel file (output file) in that folder?

1 REPLY 1
ih
Super User (Alumni) ih
Super User (Alumni)

Re: Help with JSL file run method

Yes for sure, or you could save your script in a single place and have it ask you what directory to analyze.  

 

Names default to here(1);

// Get either the current directory or ask the user to pick a directory
DirectoryToSearch = Get Default Directory();
DirectoryToSearch = Pick Directory();

// Files in that directory
FileList = Files In Directory( DirectoryToSearch );

// Filter only for specific files

//  First a function to determine if file should be included
IsFileToAnalyze = function({f}, contains(f, "Output") & (Right(f, 4) == "xlsx" ));

// Find files to analyze - filter each works in JMP 16 or newer
FilesListToAnalyze = filter each( {f}, FileList, IsFileToAnalyze(f) );