Subscribe Bookmark RSS Feed

Automatically save the file to folder

blue1994

Contributor

Joined:

Feb 27, 2017

Hi, does anyone know if I select the any file from desktop,eg: CSV, after i open that file,  it can automatically save into the working folder by using JSL? 

Thanks

 

1 REPLY
txnelson

Super User

Joined:

Jun 22, 2012

Here is a simple script that does what you want

names default to here( 1 );
// Pick the file to open
myPath = Pick File("tdisplayed text string", "path to initial folder");
dt = open(myPath);
dt << save("path to work directory.jmp);

Details on Pick File, Open and Save functions are found in the Scripting Index:

     Help==>Scripting Index

Jim