WLJS LogoWLJS Notebook

DirectoryQ

DirectoryQ["name"] gives True if the directory exists, and False otherwise.

Examples

Check if directory exists:

DirectoryQ["/path/to/folder"]
(* True or False *)

Filter directories from files:

Select[FileNames["*"], DirectoryQ]

Please visit the official Wolfram Language Reference for more details.

On this page