As a part of an assignment, I need to run two for loops in parallel in batch script. How can I run two for loops in parallel in batch script. In brief, I am using the following code to replace the contents present in file 1 with the contents present in file 2 but in a parallel manner.
Code:
FOR /f ('use backqdelims=' %%G in `type D:\Users\krkarthi\Desktop\input1.txt`) && ('use backqdelims=' %%H in `type D:\Users\krkarthi\Desktop\input2.txt`) DO cscript D:\Users\krkarthi\Desktop\replace.vbs "D:\Users\krkarthi\Desktop\test.txt" "%%~G" "%%~H")
In the above script, input1.txt and input2.txt contains the data which are defined with G and H variables. I need the ouput to be generated in a test.txt file.
The code should be executed in such a way that G and H variables should take the inputs in parallel from input1.txt and input2.txt
Please let me me know if you need more clarification on this