WLJS LogoWLJS Notebook

FileExistsQ

FileExistsQ["name"] gives True if the file exists, and False otherwise.

Examples

Check if file exists:

FileExistsQ["/path/to/file.txt"]
(* True or False *)

Conditional loading:

If[FileExistsQ["config.m"], Get["config.m"]]

Please visit the official Wolfram Language Reference for more details.

On this page