uipath technical infomation for everyone

Get various path / file names

Use VB.Net functions to obtain various file paths and file names.
Use the method of the Path class that you want to get to the Value property of the Assign activity, and get it to a variable.

< Reference page >
Path class -Microsoft Developer Network

Main methods

Get directory name
System.IO.Path.GetDirectoryName (“C: samplesample.jpeg”)


Get extension
System.IO.Path.GetExtension (“C: samplesample.jpeg”)


Get file name
System.IO.Path.GetFileName (“C: samplesample.jpeg”)


Get file name (no extension)
System.IO.Path.GetFileNameWithoutExtension (“C: samplesample.jpeg”)


Get root directory name
System.IO.Path.GetPathRoot (“C: samplesample.jpeg”)