Detect folder and create

Hi everyone

I want to be able to detect if there is a folder with the name I am processing and if it does not exist create it

my general folder is SCTR

then I have to detect if my file to be saved is an “emision, inclusion or exclusion”

in the event that it is an issue, enter and there detect if the client folder is

let’s say I have to download a file from the ADIDAS client and it is a “Emision”, the folder does not exist, so I would like to create it

I know I can use the create folder activity, but I would like to know how I set the conditions for this to happen

thank you very much I hope you can help me

You can use System.IO.Directory.Exists to determine if it exists. If it does not, you can create the folder with System.IO.Directory.CreateDirectory.

However, the Create Folder activity will attempt to create the folder if it does not exist. If the folder does exist, it will continue, meaning that this one activity would simplify your workflow more than writing the VB logic.

1 Like

@borismh, you can use Path Exists Activity for that matter.
E.g. How to check Folder or File Exist in UiPath - YouTube


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