Filter filename

I want to filter filename (value item) that equal REPORT only.

Because if I use code as below.

(item.ToString.ToUpper().Contains(“REPORT”))

It found REPORT12 and REPORT.

Please guide me for solve it.

@fairymemay

Use Equals method instead of Contains.

      (item.ToString.ToUpper().Equals(“REPORT”))
2 Likes

Hi @fairymemay

Your Condition is almost correct
Just Replace Contains by equals

(item.ToString.ToUpper().Equals(“REPORT”))

or

item.ToString.ToUpper=“REPORT”

Thanks

1 Like

grafik

1 Like

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