Mathematica > Systems Interfaces & Deployment > File Operations > Directories & Directory Operations > DirectoryQ >

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
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF