1:
- @echo off
- for /l %%i in (1,1,100) do echo %%i
- pause>nul
复制代码
2:
- @echo off
- for /l %%i in (1,2,99) do echo %%i
- pause>nul
复制代码
3:
- @echo off
- set str=bbs bathome.net
- for %%i in (%str%) do (echo %%i)
- pause>nul
复制代码
4-1:
- @echo off
- for /f "tokens=*" %%i in (test.txt) do (echo %%i)
- pause>nul
复制代码
4-2
- @echo off
- for /f "tokens=2" %%i in (test.txt) do (echo %%i)
- pause>nul
复制代码
|