how can i change all files from one extension to another within a direcory?
Using Jason Orendorff's path.py module:
# change all .py files in '.' to extension .new from path import path
for f in path('.').files():
if f.endswith('.py'):
f.rename(f.splitext()[0] + '.new')Don't try the above in a folder containing useful Python files! ;-)
-Peter -- http://mail.python.org/mailman/listinfo/python-list
