import os
path = 'E:/Python/文件/'
old_dir = os.listdir(path)
print("原始目录为%s"%old_dir)
for i in old_dir:
old_txt = path+i
print(i)
new_name=path+'学生'+i
print(new_name)
os.rename(old_txt,new_name)
new_dir=os.listdir(path)
print("现在的目录为%s"%new_dir)