in reply to Automatically delete files

A couple of minor nits. You should either skip '.' and '..', or better yet, make sure the entry you are looking at is not a directory. Also, you should probably check to make sure chdir succeeds or you might end up removing files in the current working directory.