title: How to read large text file and break it into batches for processing?
body: <p>I have a large text file that contains GUIDs that I will use to load into the Custom Application that I am trying to create.  Since the file is so large (may contain millions of lines of GUIDs), I want to break it into parts and process each part and then move to the next part afterwwards until the end of the file.</p>
  
  <p>Example of text file</p>
  
  <blockquote>
  <pre><code>ASDFSADFJO23490234AJSDFKL
  JOGIJO349230420GJDGJDO230
  BJCIOJDFOBJOD239402390423
  JFWEIOJFOWE2390423901230N
  3490FJSDOFOIWEMO23MOFI23O
  FJWEIOFJWEIOFJOI23J230022
  </code></pre>
  </blockquote>
  
  <p>Lets just say, the text file has 99,000 lines and I want to process the first 10,000 values (repeat until the end).  I will create a new folder for the first batch of 10,000 using like a DateTime.Now as the folder name.  Then, the 10,000 values will each have a file created using its value name as the file name.  After the first 10,000 values are done, I will create a new folder using DateTime.Now again and move onto the next 10,000 values in the text file.  Repeat until the end of the file.</p>
  
  <p>I am able to read the text file, create a folder with the DateTime.Now, create the file with the appropriate name, but I do not know how to batch process the list of values from the text file.  </p>
  
  <p>This is how I am reading the file.</p>
  
  <pre><code>string[] source = new string[] {}; 
  source = File.ReadAllLines(@"C:\guids.txt");
  </code></pre>
  
  <p>I tried to use the Skip/Take method, and I think it works? but I just do not know how to create a new folder and add the new subset to it.  Any help will be greatly appreciated.  I am open to suggestions and can help clarify if you need more details.  Thanks!!</p>