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

RenameFile

RenameFile
renames to .
  • must already exist; must not.
  • RenameFile sets the modification date for to be the same as for .
  • RenameFile returns the full new file name, or $Failed if the file cannot be renamed.
Copy a file:
Rename the file:
Import the renamed file:
Delete the file:
Copy a file:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]=
Rename the file:
In[4]:=
Click for copyable input
In[5]:=
Click for copyable input
Out[5]=
Import the renamed file:
In[6]:=
Click for copyable input
Out[6]=
Delete the file:
In[7]:=
Click for copyable input
New in 2