How to check a file is completely downloaded

Hi Guys,

I am using UiPath to download html file from a website and for my next activity I need to wait till it downloads ,so is there any way to know if it is completely downloaded before going to next step …?

I don’t know the name of that file, it will be different in every download.

Can anyone help!

Since file name is not known, you can try this

int count = new System.IO.DirectoryInfo(“folder”).GetFiles().Length will give you the number of files in the folder

keep checking for file count in a loop until it increases.

there might be better approaches, but give it a try

1 Like