I will suggest you to look into this blog post and change the logic to just look at file extensions intstead of if the file are related to a page.
Thank you Daniel and Henrik,
Both the links were useful. I am able to exclude the content using FilIndexer. Many thanks.
Our website is running on episerver 6 R2. Is it possible to exclude indexing of images/ VPP folder. Is there an equivalent method in episerver find for restricting VPP resources, 1.x as below:
Many thanks in advance.