<img src="//trc.taboola.com/1222697/log/3/unip?en=page_view" width="0" height="0" style="display:none">


The Knowledgebase articles are deprecated. Please visit the new Guides and Resources here: https://www.uipath.com/developers/guides-and-resources.

Knowledge Base

How To Check if a File or a Folder Exists using Path Exists Activity

This sample workflow is short, but very useful!
Using this sample workflow, you will be able to verify if a certain file or folder exists.
You can download the attached workflow file and feel free to use it.

The Process. Verifying the file or folder path


1. Path Exists Activity checks the specified file or folder
2. The Path input is where we specify the file or folder we want to check. In our example, we used the Assign activity to assign the value of the path into a variable called "path"
3. The Path type is where we specify if we are trying to find a File or a Folder. In this case, we have it set to File.
4. The results is in boolean, which gives a result of either True or False.

Confirmation Message

Once the Path Search process is complete, the workflow will return a message. If the file or folder has been found, it will give "File exists!" message. Otherwise, it will display, "File does not exist!"