- @echo off
- Setlocal enabledelayedexpansion
- set "txtPath1=C:\Users\CH6\Desktop\TEDTXTUNICODE\eng1246"
- set "txtPath2=C:\Users\CH6\Desktop\TEDTXTUNICODE\chs1203"
-
- for /f "delims=" %%i in ('dir /b/l/aa %txtPath1%\*.txt') do (
- for /f "delims=" %%a in ('dir /b/l/aa %txtPath2%\*.txt') do (
- if "%%i"=="%%a" (
- echo,%%i %%a 组合后。
- for /f "usebackq tokens=1,* delims=:" %%t in (`findstr /n "." "%txtPath1%\%%i"`) do (
- for /f "usebackq tokens=1,* delims=:" %%c in (`findstr /n "." "%txtPath2%\%%a"`) do (
- if "%%c"=="%%t" echo,%%u %%d
- )
- )
- )
- )
- )
- pause
复制代码
|