Get the Folder path in which the file resides

I have this file path:


I want to get the Folder path in which the file resides.
i.e:
image

Thanks

Hi @chauhan.rachita30

Try this

Input="C:\Users\lrtetala\Documents\UiPath\BlankProcess21\Data\Input\New Text Document.txt"
Path.GetDirectoryName(Input)

Regards,

1 Like

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