"Dynamically Clicking on Files with Variable Names in Windows Explorer"

Problem Description:

I’m facing a challenge in my UiPath automation project where I need to interact with files in Windows Explorer that have variable names. Specifically, I need to search for files with names like “ED453” or “LM123” within a folder named “AQ - \Remote.”

Here are the key points of my issue:

  1. Dynamic File Names: The file names I’m searching for are dynamic and can change with each execution. For example, I may need to search for “ED453” in one run and “LM123” in another.

  2. Interaction Steps: My automation process involves the following steps:

    • Typing the file name into the search field.
    • Navigating to the search result (without pressing “Enter”).
    • Right-clicking on the search result.
    • Selecting the “Send to” option.
    • Choosing “Compressed (zipped) folder” from the context menu.
  3. Challenge: My challenge lies in creating selectors or automation steps that adapt to the variable file names within the “AQ - \Remote” folder. I’ve attempted to use selectors with {{currentItem}} in the title attribute but encountered issues with UiPath recognizing it as a variable.
    knowing that currentItem represents the specific file name I want to search for in each iteration of my automation.

I’m seeking guidance on how to create selectors or automation steps that work with these dynamically changing file names within Windows Explorer. Any suggestions or alternative approaches would be greatly appreciated.

Thank you for your assistance!

@plumpyas

You can use directory.GetFiles("YourFolderPath","*" + RequiredFileNameVariable + "*")

Or

You can use for eqch file in folder activity and in filter give the name you need with stars just as above "*" + RequiredFileNameVariable + "*"

No need to use ui interaction for that

Cheers

What are you trying to do that you’re trying to interact with files in Windows Explorer? That’s not normally how you work with files. There are specific activities for working directly with files that do not require UI automation.

because M working on citrix

because I’m working on citrix

@plumpyas

Instead try to create a shared folder between local and citrix…drop the required file in the shared folder …perform the steps of zipping and all and place it back in shared folder…

Alternately…if using on CV then what issues are you facing…if you can point to specific issues…we can give some help

cheers

I want help to generate the dynamic selector