How to open all bmp files in a folder in order in Studio X

Hello. I’m trying to automate the operation of opening 5 .bmp files in a folder in sequence using Studio X.
My Create Method Below
Use Application → For Each File in Folder → Click

but this result, repeat it 5 times and open the same file.
How can I open all the files in order?

Please help me.

Hi @Takayuki1

I don’t know if studio x support this give it a try,

Pass the currentfile variable

And have you made the selectors of click dynamic with the currentfile variable to click files one by one or it’s a static selector.


For this more advanced scenario, you need “dynamic selectors” - that is , your UI Selector, which determines the file you click on, should change depending on the name of the file. The steps to achieve this are:

  1. Click on the little “wheel” top-right of the For Each File in Folder activity. We want to create a “Variable” or “Value mapping” like bellow. The value we assign here will act as default value and will help us validate our Selector.

  2. Change the name of the FileName variable with the the CurrentFile in you ForEach file loop:

  1. Configure the Click Activity to click on on of the files. Go and edit your selector to depend on the “FileName” variable defined above in the “text” property, by using the double curly braces notation: {{FileName}}. Uncheck Fuzzy Selector and Image methods.
    Note: you can determine the property depending on the file name (“Text”) by using the UI Explorer:





  1. Remove any properties that identify the file being clicked on, by order and not by name. In our case “automationId”.


  1. Final selector should look similar to:


  1. Run the automation and it will click on the files in the File Explorer window (*.json in my case).

Thank you, replay all. Today I finished work, I confirm your replay comments next Monday,


To Flavius Manea-San

Thank you for your replay. Now, I,m trying your method.
Probably step1, 2, was Ok. But when go to step3 “click” activity, then occur error.
What’s problem??, please follow me.
My method bellow,

“For Each File in Folder” setup

“Save for Later” and “Write Line” setup


“Click” setup, but occur error!!


I was able to solve the problem.
Tank you support for all.

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