cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
See how to use to use Text Explorer to glean valuable information from text data at April 25 webinar.
Choose Language Hide Translation Bar
View Original Published Thread

File name by week

hcarr01
Level VI

Good morning,

Is it possible to save a JMP file whose name is the current week of the script execution.

Using a script, I build a JMP data table. At the end of the script execution, I would like to be able to save the file under the following name "Week24" and the following week the file would be "Week25"....

Thank you for your answers.

Names Default To Here( 1 );

//script...
a = Week Of Year( Today(),3 );
dt1 = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt1 = current data table();

dt1 << Save As("\file...\a.jmp")

This post originally written in French and has been translated for your convenience. When you reply, it will also be translated back to French .

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User


Re: File name by week

Convert the week number to string / evaluate it inside a string and use that

Names Default To Here(1);

weekstr = "Week" || Char(Week Of Year(Today(), 3));

dt = Open("$SAMPLE_DATA/Big Class.jmp");

savepath = "$TEMP/" || weekstr ||".jmp";
dt << Save(savepath);
-Jarmo

View solution in original post

1 REPLY 1
jthi
Super User


Re: File name by week

Convert the week number to string / evaluate it inside a string and use that

Names Default To Here(1);

weekstr = "Week" || Char(Week Of Year(Today(), 3));

dt = Open("$SAMPLE_DATA/Big Class.jmp");

savepath = "$TEMP/" || weekstr ||".jmp";
dt << Save(savepath);
-Jarmo