RenameFile
RenameFile[file1,file2]
renames file1 to file2.
Details and Options
- file1 must already exist; file2 must not.
- RenameFile sets the modification date for file2 to be the same as for file1.
- 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.
- RenameFile works on local objects.
- Files can be specified either using "path" or File["path"].
- RenameFile has the following option:
-
OverwriteTarget False whether to overwrite if the target file already exists
Examples
open allclose allScope (2)
Wolfram Research (1991), RenameFile, Wolfram Language function, https://reference.wolfram.com/language/ref/RenameFile.html (updated 2020).
Text
Wolfram Research (1991), RenameFile, Wolfram Language function, https://reference.wolfram.com/language/ref/RenameFile.html (updated 2020).
CMS
Wolfram Language. 1991. "RenameFile." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/RenameFile.html.
APA
Wolfram Language. (1991). RenameFile. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RenameFile.html