False Iterations in Tparallel.for : I have a problem with number of iterations in Tparallel.for.
i have 100 folder and in each folder exist a file to be run (run.bat).
After run the out.txt file is created in folder.when i use Tparalle.for with 100 iterations, i recieve randomly 90 to 98 out.txt  while it be 100.
my code is as below  (Delphi XE7):

  Tparallel.for(1,100.procedure(i:integer)
    begin
      setcurrentdir(path+'\test\'+inttostr(i));
      winexec32andwait(pchar('run.bat'),0);

    end);

 can you help me?


 

  
