Which function should i use to extract the particular file i use getFile

Hear I use to get the file in that lot of excel files are there I want to extract the particular file. I use if condition inside that I want to use the function
For example File name = sampledata1
File name = sampledata2

I use excel.contains(“sampledata1”)
and its work but inside that, I use one more IF condition is there in that I use excel.contains(“sampledata2”) but the workflow does not come to this condition.
if I use a different name on that its work
So I need help from someone

I hope I get a replay

Could you provide the screen shot of excel files