title: Closing a pdf file via a batch script (.bat)
body: <p>I use a windows batch file <code>.bat</code> for running latex command to create a pdf. To open the final pdf file, I wrote</p>
  
  <pre><code>pdflatex %2
  START "" %2.pdf
  </code></pre>
  
  <p>Where %2 is the filename I passed it as argument. Problem is, whenever, I run the script, I have to manually close the pdf file and run the script. I want to add a command to first close the opened pdf and then run latex command and then open it</p>
  
  <pre><code>&lt;CLOSE THE PDF FILE&gt;
  pdflatex %2
  START "" %2.pdf
  </code></pre>
  
  <p>I didn't find a CLOSE command in the list of available commands, <a href="http://www.computerhope.com/batch.htm" rel="nofollow">Information on batch files</a> </p>