Naming of Subset with Original File name with _New appended<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />I have an 'original data table that I take a subset from and wish to rename the new file with the original filename but with _new appended to the filename.
e.g.
Original filename
001751-00001-1-1-VAM
after subsetting it I want to rename it
0001751-00001-1-1-VAM_new
I thought that the rename file script would do it but I can't make it pick out the name of the original file, append then save the file.
any help would be most appreciated.
Regards
David
Re: Naming of Subset with Original File name with _New appendedYikes! You're right!
I've edited my reply to correct this. Sorry!
Re: Naming of Subset with Original File name with _New appendedjeff.perkinson 's reply was spot on except there should be Selected Rows(1)
dt = Open( "$SAMPLE_DATA\Big Class.jmp" );
dt << select where( :sex == "M" );
dt << Subset( Output Table( Word( 1, dt << get name, "." ) || "_new" ), Selected Rows( 1 ) );
Re: Naming of Subset with Original File name with _New appendedWould something like this work?
dt = Open( "$SAMPLE_DATA\Big Class.jmp" );dt << select where( :sex == "M" );dt << Subset( Output Table( Word( 1, dt << get name, "." ) || "_new" ), Selected Rows( 1 ) );
It uses a reference to the original data table, dt, and the get name message to get the name and appends "_new" as you requested.
-Jeff