import osoldFileName = "test.txt"newFileName = "test.old"for file in os.listdir("c:/"): if file.startswith("output"): print fileif os.access(newFileName, os.X_OK): print "Removing " + newFileName os.remove(newFileName)os.rename(oldFileName, newFileName)for file in os.listdir("c:/"): if file.startswith("output"): print file
Name (required)
email (will not be published) (required)
Website