Parsing Filename as input using Script task

User support request
Can we split the Filenames variables into separate variables?
Example: out_backup_09212023  into 3 separate variables: out, backup and 09212023

Tech Support
The script task is available in Automize Enterprise

sample code:

import com.hitek.engine.mods.script.Script;

String filename = "test_test2_test3" ;
StringTokenizer st = new StringTokenizer(filename,"_");
int n=0;
while (st.hasMoreTokens())
{
n++;
String varValue = st.nextToken();
// set a user variable value
String varName = "var" + Integer.toString(n);
Script.setVar( varName , varValue );
Script.out("New variable added: " + varName + " , value = " + varValue );
}

As always, it is a pleasure doing business with you. We are very happy with the capabilities of the new version of Automize and are looking forward with moving ahead with our first production system based on this software. –Automize Enterprise User

Thanks for your timely response. You make a great product, and we're integrating it more and more into our daily production activities. I will try out these FTP suggestions as you've outlined. –JaSFTP User

Just wanted to compliment you folks on a great product. your product is working flawlessly! I'll definitely be purchasing it, and telling every other "IT type" I know about it! Thanks so much. –Automize User

Your program was exactly what I was looking for...you have all the features that I require; all in one program!!–AbleFTP user