新接触批处理,很有意思,请各位大侠多多指教。在此送上我的代码,多多指教!既然各位大侠都说了就题解题,那不好意思了,嘿嘿……
- @echo off&setlocal enabledelayedexpansion
- for /f "tokens=1-3" %%i in (test.txt) do (
- set temp1=%%i$$$$$&set temp2=$$$$$%%j&set temp3=%%k$$$$$
- set temp1=!temp1:~0,21!&set temp2=!temp2:~-6!&set temp3=!temp3:~0,3!
- set tempstr=!temp1! !temp2! !temp3!
- set tempstr=!tempstr:$= !
- echo !tempstr!
- )
复制代码
[ 本帖最后由 weichenxiehou 于 2010-12-30 23:37 编辑 ] |