I don't know the motivation behind your question.
But you may look at
slocate
before reinventing wheels. It allows to store in a efficient
manner such a list of file and to search on that list.
It may even be supported on Windows.
I got the URL from the rpm package but it seems wrong.
Probably the right URL may be found trhu google