
CODE: [Copy to clipboard]@echo off & SetLocal EnableDelayedExpansion
for /f "delims=: tokens=2" %%a in (1.txt) do (
for %%b in (%%a) do (
set string=%%b
if "!string:~0,1!"=="@" (
rem you can do something in this block
echo\!string!
)
)
)
pause
CODE: [Copy to clipboard]@echo off
for /f "delims=" %%a in (a.txt) do (
set var=%%a
setlocal EnableDelayedExpansion
set shu=-1
call :lis
endlocal
)
pause
exit
:lis
set /a shu+=1
set num=!var:*@=!
if "!num!"=="!var:@=!" (goto :eof) else (
echo !num:~0,6!
set var=!num!
)
goto lis
| Quote: | |
|
CODE: [Copy to clipboard][ Last edited by ansipeter on 2007-11-17 at 02:05 PM ]@echo off&setlocal
for /f "tokens=1* delims=:" %%a in (kk.txt) do call:9527 %%b
goto:eof
:9527
for %%c in (%*) do echo/%%c|findstr "^@"
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |