renameFile

0th

Percentile

Renames a file safely

Renames a file safely by also asserting that it was correctly renamed without side effects.

Keywords
internal
Usage
## S3 method for class 'default':
renameFile(pathname, newPathname, overwrite=FALSE, ..., verbose=FALSE)
Arguments
pathname
The pathname of the file to be renamed.
newPathname
The new pathname.
overwrite
If TRUE and there exists a file with new pathname, then it is overwritten.
...
Not used.
verbose
See Verbose.
Value

  • Returns TRUE if the file was successfully renamed. If it failed, an exception is thrown.

See Also

file.rename().

Aliases
  • renameFile.default
  • renameFile
Documentation reproduced from package R.utils, version 1.28.4, License: LGPL (>= 2.1)

Community examples

jonathan987 at Sep 9, 2017 R.utils v2.5.0

When you want to renames a file (or a directory) atomically/safely, by also asserting that it was successfully renamed without side effectsI use Batch Rename Files Tool. You can easily found hier BatchRenameFiles.org