关注开源代码的实际应用
1、@echo off
执行batch时不输出命令本身(包括@echo off本身),但仍输出echo内容。
2、判断文件是否存在
if exist file.ext del file.ext
if not exist file.ext copy file.bak file.ext
3、if ... else ...条件执行
if not exist file.ext (
copy file.bak file.ext
) else (
del file.ext
)