# -*- coding: utf-8 -*-
# 引入模块
import time
import os
paths = 'video'
for path in os.listdir(paths):
for files in os.listdir(paths+"/"+path):
for f in files:
timeArray = time.localtime(f.split(".")[0])
otherStyleTime = time.strftime("%Y--%m--%d %H:%M:%S", timeArray)
os.rename(os.path.join(paths+"/"+path,file),os.path.join(paths+"/"+path,str(otherStyleTime)+".mp4"))
python 重命名 根据时间戳
最新推荐文章于 2024-07-06 02:47:56 发布