本帖最后由 77七 于 2023-9-9 13:10 编辑
code1- @echo off
- (for /f "useback delims=" %%a in ("1.txt") do (
- for %%b in (%%a) do (
- set /p=%%b <nul
- )
- )
- echo=
- )>3.txt
复制代码
code2
- @echo off
- (for /f "useback delims=" %%a in ("2.txt") do (
- call :1 "%%a"
- ))>4.txt
- pause & exit
-
- :1
- set str=%~1
- :loop
- for /f "tokens=1-2*" %%b in ("%str%") do (
- echo %%b %%c
- if "%%d" neq "" (
- set str=%%d
- goto :loop
- ) else exit /b
- )
复制代码
|