Moves all files which contain input values

Dear forum member
I have developed a bot which is moving the files from one folder to another folder, which files have input values. If i am giving three keywords as input with space then it split the keyword by space and check for one by one keyword. If any one of them keyword is present then it moving the files.

But my requirement is that if all the input keywords are present in file at any place then only that files should be moved. Input keyword may be many with space.

Thankx in advance

Hi,

How about the following?

Condition : arrInput.All(Function(s) fileString.Contains(s))

1 Like

Thank for response
Please can you explain the all values in your if condition.

Hi,

All method returns True if all items are satisfy the condition. In this case, each input items are checked to be contained in fileString by Contains method. As a result, if all input words are contained in whole string, it returns True.

Regards,

1 Like