logo
  • 教程列表
  • SO官方文檔
  • if 語句
    • 比較 Errorlevel
    • 將數字與 IF 語句進行比較
    • 比較字串
    • 檢查檔案是否存在
    • 如果變數存在設定
  1. StackOverflow 文件
  2. batch-file 教程
  3. if 語句
  4. 檢查檔案是否存在

檢查檔案是否存在

Created: November-22, 2018

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

這將檢查檔案 C:\ Foo \ Bar.baz 是否存在。如果存在,則回顯檔案存在也可以新增 Not 運算子。

  • 如果變數存在設定
  • 比較字串

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明