当前位置:编程学习 > 网站相关 >>

bat几种循环

例1 goto
@echo off
:a
echo %date%;%time%
cls
goto :a

例2 %0
@echo off
echo %date%;%time%
cls
%0

【例3 call】
@echo off
set test=:4
:4
cls
echo %date%;%time%
call %test%
呵呵 不行

例3 FOR
zzzevazzz

@echo off
for /L %%i in (0,0,0) do time /t & cls


例4 >
mix0

@echo off
echo %date%;%time%
echo 1.bat>2.bat
2.bat

例1 goto
@echo off
:a
echo %date%;%time%
cls
goto :a

例2 %0
@echo off
echo %date%;%time%
cls
%0

【例3 call】
@echo off
set test=:4
:4
cls
echo %date%;%time%
call %test%
呵呵 不行

例3 FOR
zzzevazzz

@echo off
for /L %%i in (0,0,0) do time /t & cls


例4 >
mix0

@echo off
echo %date%;%time%
echo 1.bat>2.bat
2.bat

补充:综合编程 , 安全编程 ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,