Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

how to get last folder name from directory

Hi,

I have directory like "

C:\Columbus\China\PRD\scripts\app\uploads\attachments\20000

 

From this directory i want to extract the last name i.e. 20000 as folder name.

 

Can someone help me to do it in talend.

 

Regards

PK

 

Labels (3)
2 Replies
TRF
Champion II
Champion II

Hi,

If number of characters is constant use StringHandling.RIGHT else check for regex
Anonymous
Not applicable
Author

output_row.directory = (input_row.directory.substring(input_row.directory.lastIndexOf("\\")+1,input_row.directory.length()));

 

This worked for me 0683p000009MACn.png