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