If exist in path

Hi guys I want to create a condition if else

if currrentitem is existing in the in_config(“InputFolder”).ToString+""+CurrentItem.ToString go to then, if not existing else then next item

Hi @shanti_18

You can use the File exist activity which checks the file is exist or not in the provided path. The output of File exist is boolean.
Take a if condition to check the boolean value, if boolean is true it will go to then block and insert word application scope and other activities if file exist, If boolean is false means there is no file don’t insert any activities it will go for next file.

Check the below workflow for better understanding,

Hope it helps!!

@shanti_18

If (System.IO.Directory.Exists(Path.Combine(in_config("InputFolder").ToString, CurrentItem.ToString))) Then
    ' Your "then" block logic here

Hi @shanti_18

Use Path Exists Activity
Note: You can choose File as well as Folder.
It return Boolean value, Then check in IF condition and perform your task accordingly.

Hope it will helps you :slight_smile:
Cheers!!

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