- @echo off & setlocal enabledelayedexpansion
- pushd "D:\数据\"
- for /f "delims=" %%i in ('dir /b *.txt') do (
- (for /f "usebackq delims=" %%a in ("%%i") do (
- set "s1=%%a"
- set "s2="
- for /l %%b in (0 1 9) do (
- if "!s1:%%b=!" NEQ "!s1!" set "s2=!s2! %%b"
- )
- for %%b in (!s2!) do (
- for %%c in (!s2:*%%b^=!) do (
- set "s=!s2: %%b=!"
- set "s=!s: %%c=!"
- if defined s echo,!s:~1!
- )
- )
- ))>$
- move $ "%%i"
- )
- pause
复制代码
|