Hi,
I have a User input path which will have a Folder_Name at the end of the path as shown below;
C:\Users\r628953\Desktop\09-25-2018_Sample_files
So, I need to find the last occurrence of "\" in the above path and replace the right of the string with "". So, that I will get the folder name out of the string; which will be 09-25-2018_Sample_files. I have researched about it, but could not able to get the exact answer I am looking for.
Can some one help me in achieving this?
Thanks!
Solved! Go to Solution.
Hi @aparanjith1
I'm not sure if I got what you meant, but if you need to extract the last part I'd recommend you to use a Regex Expression.
REGEX_Replace([Field1], ".*\\(.+)", "$1")
If you need to replace the last expression, you could change it to REGEX_Replace([Field1], "(.*\\)(.+)", "$1replacementstring"), replacement string being what you want to put it there..
Cheers,
How about:
FileGetFileName([FullPath])
Awesome, good thing to know.
Thanks!