批量修改指定目录下文件后缀名
# -*- coding: utf-8 -*-
import os
apath = 'flac/'
path= os.listdir(apath)
for i in path:
a_name=i.split('.')[0]
#os.renames(apath+i,apath+a_name+'.mp3')
os.renames(apath+i,apath+a_name+'.mp3')
print( i+ '改名 成功' )
批量修改指定目录下文件后缀名
# -*- coding: utf-8 -*-
import os
apath = 'flac/'
path= os.listdir(apath)
for i in path:
a_name=i.split('.')[0]
#os.renames(apath+i,apath+a_name+'.mp3')
os.renames(apath+i,apath+a_name+'.mp3')
print( i+ '改名 成功' )