Path Exist if File not found Null Exception


#1

Hi All,

I process I want to check by a string that the file containing that string in its name exists or not.
and record the output in excel as “Not Found” or if found.

I tried using path exist activity but it is throwing null exception.

I am attaching the sample below , please change the file in New Folder of in the variable, and help me to get the solution.

File Not Found.zip (17.0 KB)


#2

Hi Aditi,

I am attaching solution for your issue, this is not optimal solution but should solve your issue. Main.xaml (15.0 KB)


#3

Hi @Aditipatil,
I have executed you source file. It is not give error. It is working fine.

Regards
Balamurugan


#4

Delete that file from the New Folder, You will also get same error.


#5

Hey @Aditipatil

please check below attached sample :slight_smile: it will resolve your problem for sure :slight_smile:.
just make changes :slight_smile:

File Not Found.zip (26.0 KB)

Regards…!!
Aksh


#6

@pawanbag - Thank you for response - I had put Try/Catch , in side catch I was increasing data row counter if file not found and search for next file in the same block.

But if more than 2 files were missing than it was getting failed.

@aksh1yadav - Thank you very much this for the solution.

BR
Aditi