- @echo off
- setlocal enabledelayedexpansion
- set "a=bathome"
- ::以下for循环实现的是set "b=a"&set "c=b"&set "d=c"&set "e=d"
- for %%a in (ba cb dc ed) do set "str=%%a"&set "!str:~,1!=!str:~1!"
- for /l %%i in () do if defined !e! (call set e=%%!e!%%) else echo !e!&pause&exit
复制代码
[ 本帖最后由 pgfj18 于 2010-8-2 22:57 编辑 ] |