I have a URL of a document/File from One of my Document library so from that URL I want to get the only name of that specific document/file. I have server relative URL like
sites/appdev/MyLibrary/Doc.png and I want to get only Doc.png how can I get this?

1 Answer 1


You can store Name of document by using [Current Item : Name] in a variable.
1. Use action Set workflow varible to store the string. (e.g. string = sites/appdev/MyLibrary/Doc.png)
2. Find MyLibrary in string (Output to Variable: index)
Index contains the result, which would be number 14.
3. Copy 14 characters from end of string (Output to Variable: substring)
This will return MyLibrary/Doc.png.
4. Find / in substring (Output to Variable: index1)
Index1 contains the result, which would be number 10.
5. Copy from substring, starting at 10 (Output to Variable: substring1)
substring1: Doc.png

Reference: http://www.documentmanagementworkflowinfo.com/sharepoint-2013/sharepoint-designer-workflow-string-actions.htm


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.