- @echo off & setlocal enabledelayedexpansion
- pushd "D:\文本\文本1\"
- for /f %%a in ('dir /b /on *.txt') do (
- set /a !Min:Min=1%%~na!,Max=1%%~na
- )
-
- (for /l %%a in (%Min% 1 %Max%) do (
- set "n=%%a"
- type !n:~1!.txt || echo,
- for %%b in (!n:~1!.txt) do if "%%~zb" == "0" echo,
- ))>"D:\文本\文本2\a.txt" 2>nul
- pause
复制代码
|