cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.
  • JMP will suspend normal business operations for our Rest and Recharge Day on Friday, October 2, 2026.
    Regular business hours will resume on Monday, October 5, 2026.

Discussions

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

Saving the file path of a user prompted Open() command

I'm prompting the user to open a file via this script command:

 

Open() << Set Name( "results.jmp")

 

How do I capture the file path of the file that the user chose to open?

1 ACCEPTED SOLUTION

Accepted Solutions
mmarchandFSLR
Level VI

Re: Saving the file path of a user prompted Open() command

I would use the Pick File() function for this.  You can restrict the file type and easily get the filepath.

 

Names Default To Here( 1 );
thepath = Pick File( "Choose the JMP table", "", {"JMP Data Table|jmp"} );
If( thepath != "",
	Open( thepath ) << Set Name( "results.jmp" )
);

View solution in original post

3 REPLIES 3

Re: Saving the file path of a user prompted Open() command

Using the Open() function with a file name will use the relative path. The default path can be found by call Get Default Directory().

default.png

mmarchandFSLR
Level VI

Re: Saving the file path of a user prompted Open() command

I would use the Pick File() function for this.  You can restrict the file type and easily get the filepath.

 

Names Default To Here( 1 );
thepath = Pick File( "Choose the JMP table", "", {"JMP Data Table|jmp"} );
If( thepath != "",
	Open( thepath ) << Set Name( "results.jmp" )
);
bgolob
Level I

Re: Saving the file path of a user prompted Open() command

This is the solution that worked for me.  Thanks!

Recommended Articles