How to get a particular file from a folder which I am going to download and the file name is not constant but the file name contains (tax)

How to get a particular file from a folder which I am going to download from server and the file name is not constant but the file name contains (tax)

Folder name - XXX
Inside the folder there will be around 10 files .
one file contains specific name example-TAX.
File name DE_700_TAX .
700 may change 750, 800 ,23,.

Thanks in advance

Hi,
First you can get all files from a folder by using the below code and stored it in a array of string.
Directory.GetFiles(“C:\Users\Navya\Desktop\Ex”).ToArray

next use if activity inside for each activity
condition - item.ToString.Contains(“TAX”)
In Then section you will take a messege box to see the result.

1 Like