I need a logic that bot should check this two files are existing or not in particular folder

Suggest a logic to implement it

If this two files exist means it sould do one operatiopn if not exist means it will skip the futher operation and bot will stop. Files name will vary in the date format only here is 06052022 and next day will be 07052022

Hi @Gopikrishna_S ,

Could you explain more about the File that is being checked if it exists or not ?

It seems that it might change according to the date ?

Let us know what are the dynamic content in the filename.

Also, to Check if File exists, we can use the File Exists Activity, if you already know the Folder Name, where the file resides.

yeah date will change


Use Path Exists activity for that and give the full path let’s say it is in C:\ then write as below

and declare a variable for the PathExist like CfileExists

repeat same for another file and declare a variable as FfileExists

Now use If activity and write as

CfileExists = True and FfileExists = True

in then-> both files are exist
Else-> one of the file / both files not exists

Hope this may help you


Hello @Gopikrishna_S

In this folder, will contain only these kind of files? Means ending with the current year(2022)?

Also Do you need to check whether the file exists or not?

Suppose if the file name is 06052022 and do you need to check 07052022 exist or not?

Hi @Rahul_Unnikrishnan
Please go through the code I attached here. Here I created an in argument called in_str_Folder path… pass the folder path to that argument and just run it.

Hope this helps
PathExists.xaml (5.8 KB)

But can you confirm the questions which I asked in the previous post?