This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

DirectoryQ

DirectoryQ
gives True if the directory with the specified name exists, and gives False otherwise.
  • In DirectoryQ, name is interpreted relative to your current directory.
Check if the name corresponds to a directory:
The result is False if the file is not a directory or does not exist:
Check if the name corresponds to a directory:
In[1]:=
Click for copyable input
Out[1]=
 
The result is False if the file is not a directory or does not exist:
In[1]:=
Click for copyable input
Out[1]=
New in 7