tags:

views:

116

answers:

3

i want change 'a.txt' to 'b.kml'

thanks

+3  A: 
import shutil

shutil.move('a.txt', 'b.kml')

This will work to rename or move a file.

Andy Balaam
+3  A: 

os.rename('a.txt','b.kml')

S.Mark
+2  A: 

os.rename(old, new)

From http://docs.python.org/library/os.html. This really isn't hard to find...

Joe