Description Usage Arguments Author(s) Examples
Replace pattern with replacement for all files in the specified folder matching the specified filefilter. Function is run for its side effect of renaming files.
1 | batchRename(folder = getwd(), filefilter = NULL, pattern, replacement)
|
folder |
Path to the folder containing files to be renamed. |
filefilter |
an optional regular expression. Only file names which match the regular expression will be returned. |
pattern |
regular expression describing the pattern in filenames to be replaced. |
replacement |
regular expression describing the pattern in filenames to replace pattern with. |
Caspar J. van Lissa
1 2 3 | file.create("1 a.txt")
file.create("1 b.txt")
batchRename(filefilter = "\\d \\w\\.txt", pattern = "\\s", replacement = "")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.