「bat」existでファイルの存在をチェックするサンプル

2021年6月29日

書式
if exist ファイル名

使用例

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
@echo off
if exist C:\study\skill\bat\sample.txt (
echo file exist
)
pause
@echo off if exist C:\study\skill\bat\sample.txt ( echo file exist ) pause
@echo off
if exist C:\study\skill\bat\sample.txt (
      echo file exist
)
pause

 

batch

Posted by arkgame