SyntaxFix
Write A Post
Hire A Developer
Questions
File may be inside a directory, in that case specify the path:
import os old_file = os.path.join("directory", "a.txt") new_file = os.path.join("directory", "b.kml") os.rename(old_file, new_file)