UI for selecting a list of items from a long list

Scenario

I am desgining a desktop application where the user selects a list of items and then performs operations on the items together.

One of the pages in the application allows the user to select this items from a storage that may contain thousands of items. In the storage the items are stored in a small number of folders (up to 20 folders). Each item relates to several "points of interest". There are lots of points of interest and each item may relate to just a few of them, or lots of them. Some points of interest may be related by more than one item. So to summarize the data and the relations:

  • One-to-Many relation between a folder and items
  • Many-to-Many relations between items and points of interests
  • Many-to-Many relations beteen folders and points of interest (not directly, but through the items).

The purpose of the page is to allow the user to select a list of items, while filtering by folders, and by points of interest. The user should be able to select folders, and then points of interest that are relevant to the selected folders only, and then select items. Another selection method is to first select points of interest, then select folders (only folders that relate to the points of intereset) and then select items. The selected items will then appear on a different panel.

Question

The specific problem is how to create a user experience that lets you easily filter items by folders and points of interest, in any order. The user may want to first select folders, and then points of interest (but only those that are at all relevant to the selected folders), or the other way around. What's an easy and clear UI for such requirements?