Conditionally save data to directoriesHi,
Trying to open & save the output files to predefined directories based on True or False condition. I have some saving points of the tables so I need to predefine the directory name on top of the script so I do not need to modify those saving lines once there is saving directory change.
The structure is like that but I'dont know how to implement this;
partially = True
path_partially = "D:\partially"
path_all = "D:\all"
if partially:
open(path_partially||birds.jsl)
open(path_partially||dogs.jsl)
//some process here
tables_save << save(path_partially)
else :
open(path_all||birds.jsl)
open(path_all||dogs.jsl)
//some process here
tables_save << save(path_all)
thanks
Re: Conditionally save data to directoriesAs you have stated, what you have provided is the logic of what you want, you just don't know the syntax. You have been on the Community Discussion Forum for a while now. You need to take the time to learn the syntax. Please read the Scripting Guide. It will provide you with the answers to questions such as you have currently specified. Below is some corrections to your provided code. But please take the time to read the Scripting Guide
Help==>JMP Documentation Library==>Scripting Guide
partially = "True";
path_partially = "D:\partially";
path_all = "D:\all";
if partially == 'True","
Include(path_partially|| "\birds.jsl"); // ???? open the file or include it
open(path_partially||"\dogs.jsl");
//some process here
tables_save << save(path_partially);
,
// see syntax from above
open(path_all||"\birds.jsl")
open(path_all||dogs.jsl)
//some process here
tables_save << save(path_all)
);