How split path in uipath

Hi All,

I am getting below string how to split?

C\Users\AC49183\Newfolder\nd11282019\

I want only “nd11282019”

Regards,
Hima

@thima

Try this.

str = “C\Users\AC49183\Newfolder\nd11282019”

      requiredStr = str.Split("\"c)(4)
1 Like

Hi @thima

in_String = “C\Users\AC49183\Newfolder\nd11282019”
out_String = in_String.Split(""c)(4)

image

Regards,
Kommi Jeevan.

Hi @thima

Use following method.

New FileInfo(“C\Users\AC49183\Newfolder\nd11282019\”).Directory.Name

You will only get “nd11282019”.

Thank you very much

Hello! In case you want to extract a file name from path, you can also take a look over this existing snippet from Go!:

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