Is a not equal comparison even allowed in selectors? That’s the first time I hear about it (not that we haven’t tried it in the past, but it was never a legit operation).
You could try with a workflow like below:
Main.xaml (7.4 KB)
It finds all top level windows that match the filter (in the example - explorer windows), then iterates over those that do not match the title you want to keep, highlighs and closes the window.
Be careful with CloseApplication with that setup, as it will close the whole application that it will find - that means completely closing explorer in the attached example (which is generally not what you want), hence the CloseWindow was used.
Do note that the
.ToArray in the ForEach source is needed to get rid of the IEnumerable context error:
Main has thrown an exception
Source: For each
Message: An ActivityContext can only be accessed within the scope of the function it was passed into.
Object name: 'System.Activities.CodeActivityContext'.
Exception Type: ObjectDisposedException
System.ObjectDisposedException: An ActivityContext can only be accessed within the scope of the function it was passed into.