IfExist / IfNotExist

提供: AutoHotkey Wiki
移動: 案内検索

実行制御 | GUI表示 | 演算・変数 | メモリ・DLL操作 | 文字列操作 | キーボード | マウス | シェル | ウィンドウ | ウィンドウグループ
ステータスバー | コントロール | サウンド | ファイル | INIファイル | レジストリ | 環境変数 | AutoHotkey | その他 | 設定関係 | オブジェクト

IfExist / IfNotExist[編集]

指定したファイルやディレクトリが存在するかどうかで分岐。

IfExist, FilePattern
IfNotExist, FilePattern

Parameters[編集]

FilePattern パスやファイル名、ワイルドカード。
相対パスで記述された場合、%A_WorkingDir%から検索される。

Related[編集]

Blocks, Else, Loop (ファイル検索)

Example(s)[編集]

IfExist, D:\
  MsgBox, The drive exists.
IfExist, D:\Docs\*.txt
  MsgBox, At least one .txt file exists.
IfNotExist, C:\Temp\FlagFile.txt
  MsgBox, The target file does not exist.