RenameFile

RenameFile["file1","file2"]
renames to .

Details and OptionsDetails and Options

  • 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.
  • RenameFile works on cloud objects, changing their cloud file names but not their UUIDs.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

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
Introduced in 1991
(2.0)
| Updated in 2014
(10.0)