How do I remove/unlink wildcarded files
airween at gmail.com
Fri Jan 2 10:00:51 CET 2015
On Thu, Jan 01, 2015 at 05:13:31PM -0600, Anthony Papillion wrote:
> Hi Everyone,
> I have a function I'm writing to delete wildcarded files in a directory.
> I tried this:
> def unlinkFiles():
> This doesn't seem to work because it's a wildcard filename. What is the
> proper way to delete files using wildcards?
Now I didn't checked, but once I've used some like this:
dirname = "/path/to/dir"
for f in os.listdir(dirname):
if re.match("^unix*$", f):
I � UTF-8
More information about the Python-list