rename_with_nums | R Documentation |
Rename the files in the directory, replacing file names with numbers only.
rename_with_nums(dir = ".", pattern = NULL)
dir |
The directory in which to rename the files (relative or absolute path). Defaults to current working directory. |
pattern |
A regular expression. If specified, only files with names matching this pattern will be treated. |
A logical vector with a TRUE
for each successful renaming and a
FALSE
otherwise.
## Not run:
dir.create("RenameWithNums_test")
setwd("RenameWithNums_test")
files <- c("1litres 1.txt", "1litres 30.txt", "3litres 5.txt")
file.create(files)
rename_with_nums()
list.files()
setwd("..")
dir.remove("RenameWithNums_test")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.