{{tag>Function Function_List Files}} ====== FILE_EXISTS ====== ===== Description ===== Checks if the specified file or directory exists ===== Syntax ===== ''FILE_EXISTS (path)'' Cannot be used in the condition of a [[:ref:a_f:a:find|FIND]] action. ===== Parameters ===== An expression returning a string identifying a file or directory name ===== Returns ===== **Yes/No**: whether the file or directory exists. ===== Example ===== IF FILE_EXISTS('c:/myfile.txt') = 'Yes' THEN DISPLAY MESSAGE ('File exists') ===== Related ===== [[ref:a_f:f:af:file_size|FILE_SIZE]], [[ref:a_f:f:af:file_last_modified|FILE_LAST_MODIFIED]], [[ref:a_f:f:af:file_name|FILE_NAME]], [[ref:a_f:f:af:read_text_file|READ_TEXT_FILE]]