Whether the Excel is downloaded or Not

Hi :relaxed:

I have to download the Excel from website and I need to pick the latest file from downloads path…!!

I have done entire part… But I need to check whether the new excel is downloaded or not…?? If it is not downloaded bot has send me a random message…!!

Thanks
Happy Automation

Hi @Rishik_Chowdary you can check the downloaded location whether the file downloaded or not using Path exists . eg : system.Environment.currentdirectory+"\Downloads\ExcelName.xlsx" . if you need to get the latest file
str_filepath = Directory.GetFiles(yourfolder_path,"*.txt").OrderByDescending(Function(d) New FileInfo(d).CreationTime).Tolist(0)

Thanks for ur reply…!!

But in that downloads path… We don’t what excel was downloaded… It will have different names when we download…!!

Hi @Rishik_Chowdary , From what you wrote, I guess that once you download, it gets downloaded automatically to the default download folder right?

If that’s the case, I’d try enabling the “Ask before download” setting in Chrome (if you’re using chrome) so that you get the Save As popup, and from there either rename the file to what you need, or use Get Text, to scrape the original name given by the website.

Write this in URL bar:

chrome://settings/

With this info + @Vijay_RPA 's answer, you’ll have a complete solution

Above Linq Query can bring the newly-downloaded file. and as @ignasi.peiris suggested you can save the file into particular location with the type into the name with location