"""
Modify file name,remove the numbers from file name
Python2.X
"""
# -*- coding: utf8 -*-
import os
def rename_files():
# (1) get file names in a folder
file_list = os.listdir(r"E: emp")
print(file_list)
# save_path = "E: emp"
os.chdir(r"E: emp")
# (2) for each file,rename the file name
for file_name in file_list:
os.rename(file_name, file_name.translate(None, '0123456789'))
rename_files()