批处理几点

Admin 于 2008-08-23 22:31:00 发表其它

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
    )

被阅1749次, 0票批处理 发表评论
1 / 1 / 1 | « 1 » |
Powered by MiniBoke v2.0.0.8 Build 0828

Copyright © 2008 开源吧!. All rights reserved.

粤ICP备07500939号