# -*- coding: cp936 -*-
import sys,os,string
d=0;
path="F://test"
srcfile=os.listdir(path)
for i in srcfile:
    src=path+"//"+i
    dst=path+"//"+str(d)+".txt"
    os.rename(src,dst)
    d=d+1;
    print src+"->"+dst

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-01
  • 2022-12-23
猜你喜欢
  • 2022-01-01
  • 2021-11-16
  • 2021-05-29
  • 2021-06-18
  • 2021-10-16
相关资源
相似解决方案