开发者

IF Exist Do Statement (Batch File)

Please could someone give me an example in batch of something like:

开发者_开发问答

IF test.txt EXISTS DO start test.txt


You can do if /? or help if, you know.

if exists file command

For multiple commands (or when using else), enclose them with parentheses, i.e.

if exists file (
    command1
    command2
)


Example -

IF EXIST test.txt start test.txt
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜