Download the files

I download the files from the system and their name is “Avtovidpovidach_08_03_2024_17_42.xlsx” where “_08_03_2024_17_42” is the date and time of the file upload. Later, you need to open it and paste its data into another excel. This robot should run every day and this date and time is different. How can I make sure that the robot really takes excel report that it has downloaded? Implementation on StudioX

@teslyak9437

one way use wait for download activity and it gives an output with the filepath

second …after downloading we can use for each file in folder and sort it by creation date and then the first file would be the latest and use a break after it so that after first file loop would stop

cheers

not work because the name of file have a different name (date and time of download)

Use Activities - Wait for Download activity and place the activity which starts the file downloading process.
The ‘Download Folder’ parameter will be folder where the file is being downloaded (By Default Downloads Folder)
The ‘Ignore Files’ parameter will ignore the file extensions you don’t want. (Like .crdownload which represents temporary files)

This activity will return the ‘FileInfo’ which contains the ‘File Path’ and other information.

The change in the file name will not be any issue.

how to correctly fill in the fields to get the path to this downloaded document?

1 Like

Hi @teslyak9437

Always move / clear / delete the files from folder before file download.

So download folder will always has 1 file & it will be latest.

Thanks

You can use the output FileInfo variable let say ‘FileInfoVar’ and get the full file path using
FileInfoVar.FullName. Now you can use this in move file or in use excel activity.

Remember to place the activity which start the download in the Activities - Wait for Download.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.