1.- @echo off&setlocal enabledelayedexpansion
- for /f "delims=" %%a in (1.txt) do (
- set s=%%a
- set /a n+=1
- if !n!==1 set /p=%%a<nul
- echo;%%a>nul
- )
- echo;!s!
- pause
复制代码 2.- @echo off&setlocal enabledelayedexpansion
- for /f "delims=" %%a in (1.txt) do set /p n=<1.txt&set s=%%a
- echo;!n!!s!
- pause
复制代码 3.- @echo off&setlocal enabledelayedexpansion
- (for /l %%a in (1,1,20) do set /p n%%a=)<1.txt
- echo;!n1!!n18!
- pause
复制代码
|