Check for downloading file extension using Regex

Dear Forum,

I am downloading some file from browser, I am able to extract the file info i.e name and other info,

But i have to give condition using regex that is should retry a 10 sec delay until extension is .xlsx.

Can anyone help me how to make regex in retry scope.

Sahil Garg

Hi @Sahil_Garg1

1)After downloading files from the website and save it in a specified path and then your performing the action getting the file name if i am correct.

2)Then you should go with path.GetFilename(yourpath).

3)It will give result file name with extension.


1 Like

Hi ,

Actually there is some unix code running so we can’t move file from downloads folder we have to do all processing there only.

We are getting info of downloading file but thing is it is taking time to download all data and at start the extension coming is .tmp and we have to wait until its extension coming .xlsx .

I hope you got it.

Can you help @ppr

get last modified files from a folder and you can get files using pattern.

Hey buddy,

I am getting all the info of downloaded file.

Issue is that it is taking time to for convert .tmp extension to .xlsx . i have to wait until extension is .xlsx so that i can continue with other things.

Hi Sahil,

There is an activity called wait for Download. Please refer the below URL and see if it can help in the solution you are building.


I am using the same to get info of downloaded file, But what’s happens extension of file sometimes coming .tmp and exiting the wait for download and i want .xlsx . is there any way

How can i wait until that extension becomes .xlsx

Hi @Sahil_Garg1
Try with Activity on element appear activity
Hope this may help!


How we can check file extension using On element appear ? This is used only to check for Ui element . Is i am right ?

Hi @Sahil_Garg1
Could you share me a screenshot from where you are getting the file name!


Thanks for explaining the issue again.
Please use the below workflow. This basically contains a trigger scope and File change trigger(looking for rename of file). To re create the issue I’ve first created an excel file and renamed it with Tmp extension and executed the flow. Once the trigger execution started , I manually renamed the file extension with .xlsx. As soon as the file is renamed trigger execution will be completed. Let me know if this (7.6 KB)


USe above logic and provide the path of expected file with extention


It is giving same error, as we don’t know which file will take how much time, some can be done faster , some slower.

1 Like

we don’t know file name , sometimes while downloading name comes like aeojdfg.tmp and it is taking time to convert in actual name with extension .xlsx

@Sahil_Garg1 - Check this post for the workaround…

No man , it is also not helping.

Actually, i tried one way in which i am retrying wait for download activity again if extension is .tmp , and after getting file i am deleting rest downloaded file.

For now this method is working fine

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