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
精彩评论