title: Sort csv file by three columns using command with null value?
body: <p>The case is like this : </p>
  
  <p>I have a csv file with 6 columns without header like below :</p>
  
  <pre><code>5002200,25081,0000002797,6,,2014/06/05
  5001111,25081,0000002790,,,2014/06/05
  5004901,00081,0000002799,5,,2014/06/05 
  5004901,00081,0000002796,5,,2014/06/05
  </code></pre>
  
  <p><br>
  The output I want is after sorted and displayed like below:</p>
  
  <pre><code>5001111,25081,0000002790,,,2014/06/05
  5002200,25081,0000002797,6,,2014/06/05  
  5004901,00081,0000002796,5,,2014/06/05 
  5004901,00081,0000002799,5,,2014/06/05 
  </code></pre>
  
  <p><br></p>
  
  <pre><code>@echo off
  if not exist %1 goto :EOF
  setlocal
  for /F "tokens=1-6 delims=," %%a in (%1) do set "a[%%b,%%c,%%a,%%d,%%e,%%f]=[]"
  break &gt; %1
  for /F "tokens=2-7 delims=[,]=" %%a in ('set a[') do echo %%c,%%a,%%b,%%d,%%e,%%f&gt;&gt; %1
  endlocal
  </code></pre>
  
  <p>The problem is the null value would missing. Any idea?</p>
  
  <p>My algorithm is sort the 1st columns and 3nd columns then display as original position. But if there are any empty value(like 4th or 5th columns), it would missed. 
  <br><br>First column always contains 7 length.
  <br>Only 4th or 5th column would contains empty.</p>