奇迹969

 

视频后缀PDF改MP4

import os
current_dir="D:\百度网盘\Download\F-罚丨Z\\"   #需要改
file_iterator = os.scandir(current_dir)
for file_info in file_iterator:
    houzhui = file_info.name.split(".")
    if len(houzhui)>=2:
        if houzhui[1] == "pdf":
            name = houzhui[0]+".mp4"
            name0 = current_dir+file_info.name
            name1 = current_dir+name
            os.rename(name0, name1)

  

posted on 2023-10-10 10:36  奇迹969  阅读(152)  评论(0编辑  收藏  举报

导航