title: Batch commands to swap text from file
body: <p><strong>This is the input file:-</strong></p>
  
  <pre>
  Hello,1-23456
  How are you,2-34567
  .
  .
  .
  </pre>
  
  <p><strong>I want output:-</strong></p>
  
  <pre>
  1-23456,Hello
  2-34567,How are you
  .
  .
  .
  </pre>
  
  <p>Please help me to create a batch file for this.</p>
  
  <p>I have tried this</p>
  
  <pre>
  @echo off &setlocal
  
  set "textfile=inputchq.csv"
  set "newfile=output.txt"
  
  (for /f "tokens=1,2 delims=," %%i in (%textfile%) do set srno=%%a&set comments=%%b (
      set "line=%%i"
      setlocal enabledelayedexpansion
  set "line=%comments%,%srno%"
      echo(!line!
      endlocal
  ))>>"%newfile%"
  
  </pre>
  
  <p>But i am not getting the desired output</p>