BookmarkSubscribeRSS Feed

Re: Merge CSV in JMP 13

Highlighted
AT

Frequent Contributor

Joined:

Dec 2, 2017

Thanks. I am trying to make csv merge for JMP13 and it is great to hear that JMP14 can handle this. It is time to upgrade!!

AT

Frequent Contributor

Joined:

Dec 2, 2017

Thanks all for your great support. I also like to be able to pick the directory and select individual csv files instead of slecting all csv files in the directory. I am using the script written by Byron (JMP) and have attached here. It works perfectly but if someone can help me to be able to select individual csv files, that would be very helpful. Thanks

txnelson

Super User

Joined:

Jun 22, 2012

In the Scripting Index you will find the definition and an example of using Pick File().  This will allow you to select files.

Jim
AT

Frequent Contributor

Joined:

Dec 2, 2017

Thanks Jim. I used Pick File() but I need the file names only not the fullpath/file name information. Is there a way to get file name instead?

 

 

prefilelist = Pick File(
"Select JMP File",
"",
{"JMP Files|jmp;jsl;csv", "All Files|*"},
1,
0,
"",
multiple // save flag is 0, allows multiple file selection
);

show(prefilelist);

 

 

Thanks for continuous support.

txnelson

Super User

Joined:

Jun 22, 2012

1. I very strongly suggest that you read the Scripting Guide......you need to get a review of the different items available in JSL.......

The solution to what you requested is to simply strip off the filename from the end of the complete path.  In JSL, there are all kinds of character handling functions.  See:

     Help==>Scripting Index==>Functions==>Character

Specifically, you need to use the Word() function

completefilename = "/C:/Users/txjim/Parameter Ranking/Parameter Ranking_v8 with private.jsl";
filename = Word( -1, completefilename, "/" );
show( filename );

filename has the value, "Parameter Ranking_v8 with private.jsl"

Jim
AT

Frequent Contributor

Joined:

Dec 2, 2017

Thanks Jim. I was reading mostly on Pick File() and thought there is a way to do that. I will try your suggestion and let you know. Thanks again.

AT

Frequent Contributor

Joined:

Dec 2, 2017

Thanks Jim. I was able to get it to work using Word() function. Thanks for all your support.