Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Only one doubt, how can I to cut the last characters from one file name using ((String)globalMap.get("tFileList_1_CURRENT_FILE"))?
Example:
Actual file name:
DALUNOS_RH
_20211222
Necessary:
DALUNOS_RH
I tried as below but the job show me DALUNOS_RH_202 ....
((String)globalMap.get("tFileList_1_CURRENT_FILE")).substring(0,((String)globalMap.get("tFileList_1_CURRENT_FILE")).length() - 9)
You can try expression:
((String)globalMap.get("tFileList_1_CURRENT_FILE")).substring(0, ((String)globalMap.get("tFileList_1_CURRENT_FILE")).lastIndexOf("_"))
Hello thanks and only one more doubt, if in case I have as the following: DALUNOS_RH_211203
How can I cut _211203?
thanks a lot
cut the string from last index of "_",
((String)globalMap.get("tFileList_1_CURRENT_FILE")).substring(((String)globalMap.get("tFileList_1_CURRENT_FILE")).lastIndexOf("_"))
Hello,
The lenth is fixed at the end but I need of .CSV for example.
DALUNOS_RH_20211228_125745.CSV
To be: : DALUNOS_RH.CSV
Could you give me one example of the line commnand to keep the .csv?
thanks
I solved it thanks