echo on显示和echo off关闭显示
@ 表示关闭当前行显示,命令本身会运行
call调用的脚本以及:标签
rem注释
set设置变量
goto跳转
start打开一个新窗口
if 用法
if exist a.txt (echo 找到了a.txt文件,其内容为:type a.txt) else (echo 找不到a.txt文件)
if [not] errorlevel number command [else expression]
用于判断上一条命令的返回值是否大于或等于指定的数字
if [not] string1==string2 command [else expression]
if [not] exist filename command [else expression]
if [/i] string1 compareop string2 command [else expression]
[/i]: 忽略大小写
compareop:
EQU: 等于
NEQ: 不等于
LSS : 小于
LEQ: 小于或等于
GTR: 大于
GEQ: 大于或等于
if defined variable command [else expression]
for用法
shift命令
通配符*代表所有字符,?代表一个字符
重定向<, >, >>
管道 |