Open files from same directory for WorkflowHello Community,
I only just recently started working with JMP Workflows and JSL Scripts and was wondering to create something in code to achieve the following:
- The goal is to move a workflow (copy/paste) to a specific folder, where other files like .xlsx and .csv are located. The designed script should then open a specific .csv file from within the same folder the script or workflow is located -
So for short: any ideas on how I can get the file path from the same directory the script is located in and run from? And how could I solve the idea of moving around the workflow around, keeping in mind that people will forget to delete the script after they used it?
Thanks for any advice!
Automation and ScriptingData AccessRe: Open files from same directory for WorkflowI would also like to know if there is an easy solution to reference the current directory that the workflow is in.
What I do in the meantime is use the code below. Every time the workflow runs a window opens which allows the user to select the folder the data is in, this is saved to the dir variable. I then make the dfolder and xpath variables that are used in subsequent file import steps.
dir = Pick Directory( "Choose the folder for the report" );
dfolder = dir || "Test files and jmp workflow\";
xpath = dir || "Process details and tracking.xlsx";