检查文件是否存在

If exist "C:\Foo\Bar.baz" (
    Echo File exist
)

这将检查文件 C:\ Foo \ Bar.baz 是否存在。如果存在,则回显文件存在也可以添加 Not 运算符。