title: Alignment issue in concatenating two string arrays
body: <pre><code>          A1                              
    1) Brian_Nutter                    
    2) Jesus_Crist
    3) Mai_Lau
    4) Fuckedinthehead_Feminist
  
  
  
  
            A2
  
     4652389165
     6666666666
     1261784530
     6751248900 
  
  
  
  REM  the following array is what's desired       
  
  
  
  
  
      A3
  
  
  1) Brian_Nutter               4652389165
  2) Jesus_Christ               6666666666
  3) Mai_Lau                    1261784530
  4) Fuckedinthehead_Feminist   6751248900
  </code></pre>
  
  <p>The following is Acini's code to get A3:</p>
  
  <pre><code>    @echo off
  setlocal EnableDelayedExpansion
  
  rem Load first file into A1 array:
  set i=0
  for /F "delims=" %%a in (A1.txt) do (
      set /A i+=1
      set A1[!i!]=%%a
  )
  
  rem Load second file into A2 array:
  set i=0
  for /F "delims=" %%a in (A2.txt) do (
      set /A i+=1
      set A2[!i!]=%%a
  )
  
  rem At this point, the number of lines is in %i% variable
  
  rem Merge data from both files and create the third one:
  for /L %%i in (1,1,%i%) do echo !A1[%%i]!       !A2[%%i]!&gt;&gt; A3.txt
  </code></pre>
  
  <p>OUTPUT:</p>
  
  <pre><code>            A1                                              A2
    1) Brian_Nutter                              4652389165
    2) Jesus_Crist          6666666666
    3) Mai_Lau          1261784530
    4) Fuckedinthehead_Feminist          6751248900 
  </code></pre>
  
  <p>The main issue here is that when the strings of the second array (A2) are concatenated with the strings of the first(A1) the array A3 becomes a mess owing to the fact that THE ALIGNMENT OF STRINGS IN A2 when placed in A3 is dependent on the the <strong>length of the strings in A1</strong>.Only in the special case where <strong>all the strings of A1 are of equal size</strong> do we get our desired neat output array.
  So how do we tackle this ?
  One possible method (i tried it on this example) would be to <strong>equalize the strings by padding</strong> in A1.IOW find out the maximum no. of characters in any string in A1 and then pad the others with "-" or "_"</p>
  
  <p><strong>PS :</strong> Assume that we have only notepad at our disposal!</p>