How to filter/get specific excel file from a folder

Hi Guys, sorry to interrupt. I am new to UiPath and a intern at a local company. Just want to ask you guys how to filter or get the specific file like Lido, Nex, etc after I have downloaded from email?


1 Like

Buddy @phoenix123

  1. Use directory.Getfiles(“youremailattachmentfoldepath”,“*.xlsx”) with the output variable ot type string array named out_file_array
  2. Use a for each loop and pass the previous out_file_array variable as input and change the type argument in for each loop property as string
  3. Inside for each loop use a ir condition like this
    Item.ToString.contains(“Lido”) or Item.ToString.contains(“Nex”)

If thia condition geta satisfied, get that file name in assign activity of string list type in then part of if condition like this
Out_file_list = Out_file_list.Add(item)

Leave the else part…
And now you can get the file name from list by mentioning like out_file_list(0).ToString or any index…you want but be sure to initialize the out_file_list as new list (of string)


1 Like

@phoenix123 Try this once
Filtering Files in a (1.7 KB)


@vickydas @Palaniyappan hey guys both of solution and theory is working according to what I expect thanks for your help and effort once again! :slight_smile:

@vickydas @Palaniyappan hey guys one more extra questions hopefully the last, can UiPath select date picker e.g. I want to select the period from 11/04/2019 to 17/04/2019 must be fixed +6 days so is 11+6=17 so far I know that UiPath cannot select datepicker but my company application can type up/down arrow key.

If possible you can type into with date as string buddy, to that field

hello @phoenix123
A simple solution would be to use Send hotkeys Activity (6 times) according to your condition after entering the date in the first tab.
I Created a sample workflow using Clicks please check this to get some ideas and use whatever suits you the best.
DatePicker (2.4 KB)

@Palaniyappan hey buddy I can’t type on the text box as my company application can’t type anything on the text box. So far I know can use left right arrow key to work.

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