开发者

IF Exist Do Statement (Batch File)

开发者 https://www.devze.com 2023-03-06 06:52 出处:网络
Please could someone give me an example in batch of something like: 开发者_开发问答 IF test.txt EXISTS DO start test.txtYou can do if /? or help if, you know.

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

精彩评论

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

关注公众号