i have been downloading files from the webpage and extracting data from it but inbetween sometimes an empty file gets downloaded with random file name and the extraction process stops there itself because it couldnt read from it and i have no idea from where it gets downloaded automatically, i have also checked manually with it. so, if anybody has idea about this, please do share here
do u mean the downloading process is distrubing the web extraction process , right and now your requirement is to mitigate it right ?
actually, i am trying to download multiple files from webpage and extracting data from it but inbetween a empty file gets downloaded and the process stops there itself
So u need to continue your process even when an empty file is downloaded even after reading it right ?
exactly, because i am downloading more than 300 files and extracting data from it and i want that process to be continued
its a random file with random name and contains nothing
So two ways u can try
- Measure the size of file which is downloaded ,
you can refer this link
Calculate Size of a particular file
After getting filesize, if it empty, it would be 0 (i assume), in that case using validation condition, u can continue ur process
- another way is to use try catch activity, since u are reading an empty excel file, may be there would error at that time, u catch block and handle error properly
can you explain me in detail how to catch that error using try catch block ?
Like may i know is there any error after trying to read the file (empty)?
this is the error i am getting since it is an empty file @NIVED_NAMBIAR all my file name contains po number in it and this file name is random and has nthg in it
Like can u show the process screenshot?
Download_FulFillment_Files.zip (5.9 KB)
i have shared file, please check it out @NIVED_NAMBIAR
Can u share the screenshot of process?
i have shared screenshots below @NIVED_NAMBIAR
Here what u had to do is :
Put the whole activities used inside the ForEach row activity under Try-Catch.
Incatch section, put exception type as System.Exception and the corresponding actions as Continue,
so in case of any error, when it goes to catch section, continue activity will helps to continue to next iteration even if the current iteration got failed,
Hope you got the logic
thank you @NIVED_NAMBIAR i will try and let you know
should i give like this? @NIVED_NAMBIAR
you should NOT place the complete for each row under try catch, you should place all actvity under ForEach row under try catch
the activity is under for each row oly so i put it in a try catch @NIVED_NAMBIAR
if this is wrong then sorry i dint get you @NIVED_NAMBIAR