Review your architecture. This is the general rule for the memory leaks in .NET. Random leaks are much less likely, most of the leaks are due to wrong design/architecture. Please see my past answers:
Best way to get rid of a public static List Causing an Out of Memory[
^],
Memory management in MDI forms[
^],
Memory leak in WPF DataBinding[
^],
deferring varirable inside the loop can cuase memory leak?[
^],
Garbage collectotion takes care of all the memory management[
^].
For further ideas, I would need to know what are you going to do with 20,000 files. I cannot believe anyone need to use them at the same time, or even see them. Hence, you need some kind of virtualization. For example, with UI you may want to use paging, searching for files and loading file names only when the next portion is required. However, to me, the whole idea to have all these files look quite questionable. Without knowing your purpose, I cannot suggest you any alternative but almost sure they do exist.
—SA