IfExist / IfNotExist

파일이나 폴더의 존재 여부를 점검합니다.

비추천: 이러한 명령어는 새 스크립트에 사용을 추천하지 않습니다. 대신 FileExist 기능을 사용하십시오.

IfExist, FilePattern
IfNotExist, FilePattern

매개변수

FilePattern

점검할 경로, 파일이름 또는 파일 패턴. FilePattern은 절대 경로를 지정하지 않으면 %A_WorkingDir%에 있다고 간주됩니다.

FileExist(), 블록, Else, File-회돌이

예제

Shows a message box if the D drive does exist.

IfExist, D:\
    MsgBox, 드라이브가 존재합니다.

Shows a message box if at least one text file does exist in a directory.

IfExist, D:\Docs\*.txt
    MsgBox, 적어도 하나의 .txt 파일이 존재합니다.

Shows a message box if a file does not exist.

IfNotExist, C:\Temp\FlagFile.txt
    MsgBox, 목표 파일이 존재하지 않습니다.