条件判断一,判断执行:- @echo off
- for /l %%a in (1 1 100) do (
- for /l %%b in (%%a 2 100) do if %%a gtr 20 echo %%a
- )
- pause
复制代码 条件判断二,更换语句:- @echo off&setlocal enabledelayedexpansion 2>nul 3>nul
- for /l %%a in (1 1 10) do (
- if %%a leq 5 (set "echo=echo error") else set "echo=cd z:"
- for /l %%b in (%%a 2 10) do !echo!||echo bingo
- )
- pause
复制代码
[ 本帖最后由 zm900612 于 2011-3-13 17:33 编辑 ] |