title: How to delete a line of a text file, given the line number using batch (.bat) script?
body: <p>I want to write a batch script where the user can enter the line number and the script will delete that line of a text file.</p>
  
  <p>Eg: tmp.txt</p>
  
  <pre><code>1. aaa
  2. bbb
  3. ccc
  4. ddd
  </code></pre>
  
  <p>I want when i execute my script and user inputs 3, the tmp.txt to be</p>
  
  <pre><code>1. aaa
  2. bbb
  4. ddd
  </code></pre>
  
  <p>I am trying something like this:</p>
  
  <pre><code>@ECHO OFF
  
  SET /P LINENUMBER=Enter the Line No:
  
  FOR /F "tokens=1* delims=[]" %%a IN ('FIND /n /v "" ^&lt; tmp.txt') DO (   
      IF %%a equ %LINENUMBER% (
                    ????????????????????
      )
  )
  </code></pre>