Download and open recent file

I want download a excel file from website and then open it. if i open folder using use application/browser and click on recent files or download how can it target recent file and open. As it open previously targeted file. Please guide me

Hi

Is there any way to identify from the browser page that it is a new file
@praveen5

Hello @praveen5

  1. Open Browser to the website containing the Excel file.
  2. Interact with the website to trigger the download of the Excel file.
    • Click on the download link or button.
  3. Wait for the download to complete using the “Wait for File” activity.
    • Check if the downloaded file exists in the specified download folder.
    • Check if the file size remains constant for a certain duration.
  4. Use the “Start Process” activity to open the downloaded Excel file.
    • Set the “FileName” property to the path of the downloaded Excel file.

Thanks & Cheers!!!

2 Likes

@praveen5

Directory.Getfiles(Varible of folderPath).OderByDescending(function(f) new FileInfo(f).creationTime).First

Hope It Helps!!

hi Kartheek
You can use this syntax in assign activity

Directory.GetFiles(“C:\Users"+Environment.UserName+”\Downloads",“*.xlsx”).OrderByDescending(Function(d) New FileInfo(d).CreationTime).ToList(0)

Thanks and regards
Vineet