title: IAR - Adding pre-build command to delete an object file
body: <p>In IAR embedded workbench IDE, I need to force the compilation of a file, every time I build the project (in order to recompile <code>__DATE__</code> and <code>__TIME__</code>).</p>
  <p>So I need to &quot;touch&quot; that file (i.e., delete the corresponding object file).</p>
  <p>I went into the project options --&gt; C/C++ Compiler --&gt; Extra Options --&gt; Use command line options.</p>
  <p>In there, I entered a shell command for deleting that file, but without luck.
  I tried several different ways of doing it, including to call a batch file.
  Examples:</p>
  <ol>
  <li><p><code>del &quot;$OBJ_DIR$\mng_version.o&quot;</code></p>
  </li>
  <li><p><code>cmd /c &quot;del &quot;$OBJ_DIR$\mng_version.o&quot;&quot;</code></p>
  </li>
  <li><p><code>pre_build.bat</code></p>
  </li>
  </ol>
  <p>None of these worked.
  Does anybody have any idea how to do this?</p>