- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
File name by week
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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