返回列表 发帖
新接触批处理,很有意思,请各位大侠多多指教。在此送上我的代码,多多指教!既然各位大侠都说了就题解题,那不好意思了,嘿嘿……

  1. @echo off&setlocal enabledelayedexpansion
  2. for /f "tokens=1-3" %%i in (test.txt) do (
  3. set temp1=%%i$$$$$&set temp2=$$$$$%%j&set temp3=%%k$$$$$
  4. set temp1=!temp1:~0,21!&set temp2=!temp2:~-6!&set temp3=!temp3:~0,3!
  5. set tempstr=!temp1!      !temp2! !temp3!
  6. set tempstr=!tempstr:$= !
  7. echo !tempstr!
  8. )
复制代码

[ 本帖最后由 weichenxiehou 于 2010-12-30 23:37 编辑 ]
看得多说得多,远比不上写得多。

TOP

返回列表