查看“代码暂存”的源代码
←
代码暂存
跳到导航
跳到搜索
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
*Arctime Pro字幕通用样式 <pre>Style: SUBTITLE,阿里巴巴普惠体 H,75,&H0000B3FF,&H000000FF,&H00000000,&H00000000,0,0,0,0,100.0,100.0,0.0,0.0,1,2.0,2.8846154,2,10,10,40,1</pre> **紫色版 <pre>Style: StyleName,阿里巴巴普惠体 H,75,&H00F56F8B,&H000000FF,&H00790743,&H00790743,0,0,0,0,100.0,100.0,0.0,0.0,1,2.0,2.5,2,10,10,59,1</pre> *PPT导出1080P 60FPS的宏 <pre> Sub PowerPointVideo() If ActivePresentation.CreateVideoStatus <> ppMediaTaskStatusInProgress Then ActivePresentation.CreateVideo FileName:=Environ("USERPROFILE") & "\Desktop\Your PowerPoint Video.mp4", _ UseTimingsAndNarrations:=True, _ VertResolution:=1080, _ FramesPerSecond:=60, _ Quality:=100 Else: MsgBox "There is another conversion to video in progress" End If End Sub </pre> *将多个重复命名编号不同的文件名称进行修改 我现在有image001.png、image002.png、image003.png到image578.png的文件。需要让他们后面的序号全部加2并且去掉前面的00格式,如image001.png要改为image3.png。 <pre> import os import shutil # 遍历目录下的文件 directory = "./your_directory_path" # 替换为实际的目录路径 destination_directory = "./your_directory_path" # 替换为实际的目标文件目录路径 for filename in os.listdir(directory): if filename.startswith("image"): # 提取序号部分并将其转换为整数 index = int(filename[5:8]) # 修改序号加2并格式化为不带前导零的字符串 new_index = str(index + 2) # 构造新的文件名 new_filename = "image" + new_index + ".png" # 创建原文件的路径和新文件的路径 old_path = os.path.join(directory, filename) new_path = os.path.join(destination_directory, new_filename) # 重命名文件 os.rename(old_path, new_path) </pre>
返回至“
代码暂存
”。
导航菜单
个人工具
登录
命名空间
页面
讨论
变体
已展开
已折叠
查看
阅读
查看源代码
查看历史
更多
已展开
已折叠
搜索
导航
首页
最近更改
随机页面
MediaWiki帮助
工具
链入页面
相关更改
特殊页面
页面信息