Retrieve a part of the folder path

Hi Guys,

Requirement:
Retrieve part of the path based on value in particular variable.

As an example,
path = /s1/s2-UAT/B Gov/Test/1001-dm

Now, in a variable, value “B Gov” would be there as shown in bold in above path mentioned.

I want to split/retrieve the path starting “B Gov” till end.

How can this be done?

Regards
Sonali

Hi Guys,

Got the solution.

Used below:
path.substring(path.IndexOf(variable))

And it worked fine.

Regards
Sonali

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.