本帖最后由 aloha20200628 于 2024-6-10 19:25 编辑
回复 1# 1139054012
以下代码存为 test.bat 置于字幕文件目录(*.ass *.ssa *.srt)下运行...
- @echo off &set "tc=「繁体」" &set "sc=「简体」"
- (md %tc% & md %sc%) 2>nul
- for /f "delims=" %%F in (' dir /b/a-d "*.tc.???" "*.sc.???" ') do (
- set "_s=%%F" &set "s=%%~nF" & setlocal enabledelayedexpansion
- if /i "!s:~-2!"=="tc" (move /y "!_s!" "!tc!\!s:~0,-2!%%~xF") else (
- move /y "!_s!" "!sc!\!s:~0,-2!%%~xF"
- )
- endlocal
- )
- pause&exit/b
复制代码
|