os.unlink multiple file in python
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/991279/deleting-files-by-type-in-python-on-windows">Deleting files by type in Python on Windows</a>  </p>
</blockquote>

<p>How can I delete all files with the extension ".txt" in a directory? I normally just do</p>

<pre><code>import os
filepath = 'C:\directory\thefile.txt'
os.unlink(filepath)
</code></pre>

<p>Is there a command like os.unlink('C:\directory\'*.txt) that would delete all .txt files? How can I do that?
Thanks!</p>
