title: Deleting last n lines from file using batch file
body: <p>How to delete last n lines from file using batch script</p>
  
  <p>I don't have any idea about batch files, I am writing batch file for the first time.</p>
  
  <p>How should I write this batch file?</p>
  
  <p>For Windows7</p>
  
  <p>Try it for </p>
  
  <pre><code>&lt;Project_Name&gt;
  
      &lt;Noter&gt;
          &lt;Common&gt;
          &lt;File&gt;D:\Project_Name\Util.jar&lt;/File&gt;
          &lt;File&gt;D:\Project_Name\Noter.bat&lt;/File&gt;
          &lt;File&gt;D:Project_Name\Noter.xml&lt;/File&gt;
          &lt;File&gt;D:Project_Name\Noter.jar&lt;/File&gt;       
          &lt;/Common&gt;
  
          &lt;Project_Name&gt;
              &lt;File&gt;D:\Util.bat&lt;/File&gt;
              &lt;File&gt;D:\Util.xml&lt;/File&gt;
              &lt;File&gt;D:\log.bat&lt;/File&gt;
          &lt;/Project_Name&gt;
      &lt;/Noter&gt;
      &lt;CCNET&gt;
  </code></pre>