I want to get a list of files that contain str from another list, but the return is empty. What did I do wrong? Can someone advise? Below is my script.
filelist = Files In Directory( path );
//filelist={"123_123_1_acdr.csv", "234_113_100_rqtfgy.csv", "53_1243_12_qqwed.csv", "6_12378_23_rty.csv"}
lst1 = {"234_113_100", "53_1243_12"};
lst2 = {};
For( i = 1, i <= N Items( filelist ), i++,
If( Contains( lst1, filelist[i] ),
Insert Into( lst2, filelist[i] )
)
);
Print( lst2 );
the expected output of lst2 ={"234_113_100_rqtfgy.csv", "53_1243_12_qqwed.csv"} however, the output lst2 is empty.