「bat」existでファイルの存在をチェックするサンプル
書式
if exist ファイル名
使用例
@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