Make all files extension lower by a given directory name

Fredrik Lundh fredrik at
Wed Nov 1 15:25:59 CET 2006

Tiefeng Wu wrote:

> strip off the last character because if simply add name
 > and ext I got result like "", there are two dots.

that's not how splitext works, though:

 >>> os.path.splitext("FOO.BAR")
('FOO', '.BAR')

can you post an example of a filename that misbehaves on your machine?


More information about the Python-list mailing list