Dear,
I am lecturer at Department of Chemistry and have many experience in c++ and windows scripting. Your files are large, so I recommend you to using small windows app rather than windows commands. The performance of windows scripting is much slower, approximately 100.000 slower than compiled programs for handling file line by line. You can chat me for further discussion.
Best regards,