windows批处理
来源:互联网 发布:java怎么实现导出word 编辑:程序博客网 时间:2024/06/06 06:30
windows批处理
命令
含义
echo off
批处理中不在DOS窗口显示执行的命令(除echo off本身外,它本身是一个命令,但它会显示在DOS窗口)
@echo off
批处理中不在DOS窗口显示执行的命令(包括echo off本身)(一般放在批处理脚本的开头)
echo
pause
断点命令,常用来进行调试批处理脚本
示例
windows-bat-test1.bat文件
rem 一般会在windows批处理中看到@echo off命令,它的意思是此批处理中的命令不会在DOS窗口显示
rem pause
rem 循环
rem for %%i in (1,2,3) do echo %%i
rem 定义变量使用set,格式为"set 变量名=变量值"(注意:赋值符号和变量值之间不能出现空格)
set array=a,b,c
echo %array%
for %%i in (%array%) do echo %%i
rem for循环中添加/L时,in后面的括号中的三个参数代表(开始位置,步长,结束位置)
for /L %%i in (1,1,5) do echo %%i
rem 执行三次"ping 127.0.0.1"操作
rem for /L %%i in (1,1,3) do ping 127.0.0.1
rem if语句
set var1=saber
if ["saber"] equ ["%var1%"] (
echo %var1%
) else (
echo 不相同
)
0 0
- windows批处理
- windows批处理
- Windows批处理
- windows批处理
- windows批处理
- WINDOWS批处理
- windows批处理
- windows 批处理
- Windows批处理
- windows批处理
- windows批处理
- windows批处理
- Windows 批处理
- windows批处理
- windows批处理
- Windows批处理
- windows批处理
- Windows 批处理
- 知识库--Concurrency+ThreadPool+Executors(79)
- 矩阵第二章总结笔记
- mysql 提示:Every derived table must have its own alias
- js中方法调用的4中方式
- 第24课 Python文件打开、读写模式详解
- windows批处理
- linux应用程序(4)---CORE DUMP
- LeetCode 108. Convert Sorted Array to Binary Search Tree
- surfaceflinger增加hdmi显示设备
- thinkphp安装引导程序
- 《算法概论》习题8.12题解
- 【Unity 3D学习】NGUI中Tab的实现
- OpenCv的xml读写(opencv教程大全)
- js中String对象