2楼、6楼代码作废,看看这样是不是符合你的需求:- @echo off &@cls&chcp>nul 65001
- setlocal enabledelayedexpansion
- for /f "delims=" %%i in ('dir /b /a-d *时间*.srt') do findstr "." "%%i">temp
- for /f "delims=" %%a in ('dir /b /a-d *内容*.srt') do (
- (for /f "delims=" %%i in ('type "%%a"') do (
- set /p str=
- set m=%%i
- set /a n=m
- if "!n!"=="%%i" (
- echo,!n!
- ) else if "!n!."=="%%i" (
- echo,!n!
- ) else (
- echo,!str!
- echo,%%i
- echo,
- )
- ))<temp>Merge-%%a
- )
- del temp
- pause
复制代码
|