Remove file extension from files using Python

Following on from the other two posts

I have decided to add another example in Python

import glob, os
folder = "."
for filename in glob.iglob(os.path.join(folder, '*.grf')):
  os.rename(filename, filename[:-4] + '')

Do you have any examples or different ways, maybe even some other languages, please feel free to get into contact.

I am always interested in feedback so please feel free to add any comments, or you can mail me  here.  If you would like to submit a quick tip  with full credit and links back to your site then also feel free to contact me.

Related Posts Plugin for WordPress, Blogger...

Using the Pi π Symbol in Pages

Remove file extension from files using Perl