in one folder, for example there are three excel files, named 1.xlsx , 2.xlsx and master.xlsx.
i used directory.getfiles(path, “*.xlsx”) to to get a string but i dont not want contains the master.xlsx just 1.xlsx and 2.xlsx , how could i achieve this function?
@Chris-Yiwei even though you get all those files you can filter by using if condition inside the for each loop,say for example as you said there are three files out of that you want only two,so inside the for each loop you can give if condition like item which contains master if it finds it went to then if not else,so to the else condition other two files will come.have a try this
Hi
Kindly folllow the below steps that could help you resolve this
—use as assign activity like this Out_Filepatharray = Directory.GetFiles(“yourfolderpath”,”*.xlsx”).Where(name => !name.EndsWith(“Master.xlsx”))
Or by this mean as well @Chris-Yiwei
Out_Filepatharray = Directory.GetFiles(“yourfolderpath”,”*.xlsx”)