title: Batch script - redirecting - possible file lock?
body: <p>I have a batch script that unzips some files from a folder and this script may be called several times.</p>
  
  <p>For unzipping I use unzip.exe and I log it to a log file. For instance this is what goes into this logfile:</p>
  
  <pre><code>ECHO %DATE% - %TIME% &gt;&gt; Unzipped.log
  ECHO ERROR LEVEL IS: !ERRORLEVEL! &gt;&gt; Unzipped.log
  ECHO Error with file %1 &gt;&gt; Unzipped.log
  </code></pre>
  
  <p>My question is, is it possible to get a <em>file lock</em> on "<strong>Unzipped.log</strong>" file, if my batch script is called several times in a short time period?</p>
  
  <p>I've tried to google this but with no luck. The only time where I have seen a problem is when I open the "<strong>Unzipped.log</strong>" file in Word, than my batch script won't write to it. When I have it open in Notepad/Notepad++ there is no problem in writing to the log file.</p>