"James Kew" <james.kew at btinternet.com> wrote: > Take a look at os.path.splitext -- testing os.path.splitext(filename)[1] > will tell you if the filename carries an extension or not. That's a great tip!!! This bit of code does it: ext = os.path.splitext(fname) if not ext[1]: do the rename...