ajCheckFileExists function
Description
The ajCheckFileExists function checks whether a specified file exists or not.
Syntax
ajCheckFileExists(file_path, [run_condition], [run_by_function_point_only])
Argument Name | Description |
---|---|
file_path (required) | Check the full path of the file. Both the forward-slash (/) and backslash (\) are supported as the folder separator. |
run_condition (optional) | The function will run when the value is TRUE. Otherwise will not run. If you do not specify anything, the default value will always be TRUE. |
run_by_function_point_only (optional) | If it equals FALSE, the function can be executed through ‘Excel Calculation’ (it can be either Automatic or Manual, Calculate Now or Calculate Sheet) or Run Function Point. If it equals TRUE, the function can be executed with Run Function Point (AlchemyJ toolbar / Run Function Point) only. If you do not specify anything, the default value will always be TRUE. |
The function will return:
1) Content type: TRUE, FALSE
2) Method: within a cell / cell array
Example
=ajCheckFileExists("c:\source.txt")
If the file exists, the function returns TRUE. Otherwise, it returns FALSE.