C# match and export based on listbox textfile and wildcard
<p>I like to thank stackoverflow member AlbertEin for helping with this code.  What I have is a file being created from a massive directory listing, and i also have a listbox full of items that are only part of the file name in the directory listing.  What I want to do is write out a text file for every listboxitem in listbox1.item based on the item and a wildcard</p>

<p>Example Listbox:<br>
Apple<br>
Orange  </p>

<p>Results Apple.txt:<br>
Apple13.txt<br>
Apple15.txt<br>
Apple19.txt  </p>

<p>and just do this foreach item in the listbox.  I'd also like to only read the master txt file once to save me from reading it everytime.  Any help appricated.</p>

<p>Better explaination:</p>

<p>I have a listbox of 100 items, and 1 master text file that was created.</p>

<p>For all items in the listbox that match the master test file, I want to write out the matching contents of the master text file to a new textfile with the listboxs name.</p>

<p>The listbox items needs a wildcard in order to match the master text file.</p>
