Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Systems Interfaces & Deployment > File Operations > FileExistsQ >

FileExistsQ

FileExistsQ
gives True if the file with the specified name exists, and gives False otherwise.
  • In FileExistsQ, name is interpreted relative to your current directory.
  • FileExistsQ tests for files, directories or any other filesystem objects.
Check if a file exists:
Create a file:
Check if the file exists:
Delete the file:
Check if a file exists:
In[1]:=
Click for copyable input
Out[1]=
 
Create a file:
In[1]:=
Click for copyable input
Check if the file exists:
In[2]:=
Click for copyable input
Out[2]=
Delete the file:
In[3]:=
Click for copyable input
New in 7
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF