# How to Split a String

**URL:** <https://forum.uipath.com/t/how-to-split-a-string/2098>\
**Category:** Help\
**Tags:** variable, string, studio, system, activities\
**Created:** [March 6, 2017, 3:02am UTC](https://forum.uipath.com/t/how-to-split-a-string/2098 "2017-03-06T03:02:24Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![arun.arora](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/arun.arora/32/405331_2.png) [@arun.arora](https://forum.uipath.com/u/arun.arora)\
**Post date:** [September 28, 2017, 3:37pm UTC](https://forum.uipath.com/t/how-to-split-a-string/2098/15 "2017-09-28T15:37:54Z")

</div>

I know this is a old post, however I was stuck in split string and was working on resolution which I wanted to share. I wanted to get the file name using the “Path.GetFileName” function into a single variable. the sample workflow works fine, you just need to specify the complete path along with the file name under “Path.GetFileName” function. Sample uploaded.[Get\_FileName\_String\_Split.zip](https://global.discourse-cdn.com/uipath/original/2X/5/58680d63092db072874aee63e54c87e58fa5b5e5.zip) (2.2 KB)

---

_[View the full topic](https://forum.uipath.com/t/how-to-split-a-string/2098)._
