- @echo off&setlocal enabledelayedexpansion
- echo 要怎么学好批处理?>a.txt
- echo 可潜水看帖,静静研究;>>a.txt
- echo 可看教程做习题,然后解决实际的问题;>>a.txt
- echo 也可二者并用取其优,当然还有其他方法。>>a.txt
- echo 你是怎么做的呢?>>a.txt
- set shu= 一二三四五
- for /f "tokens=* delims=" %%i in (a.txt) do (
- set str=%%i
- set /a n+=1
- call echo %%shu:~!n!,1%%┃!str!
- )
- del a.txt
- pause
复制代码
|