Check and wait as long as a generated file exists in a folder

I have a very special issue. I have a website that downloads a file. I cannot choose the path. And the name of the file is always generated.

In my process I need to wait for that file to continue. But sometimes the download takes 1 second. Sometimes it can take up to 50 seconds. I do not want to always wait 50 seconds with for example a large timeout.

So I was thinking about using the Monitor Event File Change Trigger:
grafik

This could work. But as I said I don’t know the exact name of the file.

This is super tricky. I know how to read files from a directory. But I never know when the file has been downloaded.

And another bad thing is. When I use the File Change Trigger, the first file that is downloaded is a “…tmp” file! So I additionally need to check for a file with “.xml” extention.

So is there anything else I could do here? Maybe combine some activities?

What would work for me is the File Change Trigger that is only triggered on the .xml file.

I found a workaround that seem to work properly for my case. Here for someone else with the same issue:

  1. Click the Javascript download link
  2. Look if the file has already been downloaded (do that with a GetDirectories script)
  3. If there is a file of that type, all fine!
  4. In there case where the download still waits, we need to have use a File Change Trigger
  5. User a delas to wait for the browser to transform the tmp file into the original file

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