Open a Dialog box to select File or Folder in UiPath

A lot of times while performing attended automation we tend to use a lot of files.

Either you want to upload or select a file or folder while the bot is executing in Attended mode.

There is an Activity that is available in UiPath to achieve this task.

Let’s see how you can use this activity and also the implementation.

Where you can find this activity in UiPath Studio designer panel.

Open the designer panel and in the Activities section, you can find this as shown below:

select File or Folder

Activity Name: Select File

Step 1: Drag and drop this activity in the designer panel and below are the properties of this activity that you can use:

Properties:

  • Filter: This is used to specify the type of file you want to filter.
  • SeletedFile: This will be the output file path of the selected file. Which is a full path.

What does a filter string contain?

Filter string: (*.xlsx)|*.xlsx
  • (*.xlsx) – Description of which type of file we need to select.
  • It should be followed by a vertical bar as shown above.
  • *.xlsx – This is the file extension.

Let’s see some of the Filters that can be used in this property:

To select all types of files : All files (*.*)|*.*

To select a single type of file : (*.xlsx)|*.xlsx

To select multiple types of files : (*.pdf, *.xlsx)|*.pdf;*.xlsx

For selecting multiple types of we need to use semicolon(;) in between the file extensions.

Now let’s see how that dialog box looks like:

select File or Folder

This is how you select a file in Attended automation using UiPath.

Let’s continue to see how we can select folder using UiPath Activity.

Activity Name: Select Folder

Step1: Drag and drop this activity into the UiPath studio designer panel and below are the properties that you can use.

Properties:

  • SelectedFolder: From this property, you will get the selected folder path in the dialog box.

This is the only property and also the dialog box looks the same as select file activity.

In this we don’t have any filters because we are selecting folders.

Happy Learning!

Like this post then let your friends know about this-:

Leave a Reply

Your email address will not be published. Required fields are marked *