RenameWithNums

0th

Percentile

Replace file names with numbers.

Rename the files in the directory, replacing file names with numbers only.

Usage
RenameWithNums(dir = ".", pattern = NULL)
Arguments
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.

Value

A logical vector with a TRUE for each successful renaming.

Aliases
  • RenameWithNums
Examples
setwd(tempdir())
dir.create("RenameWithNums_test")
setwd("RenameWithNums_test")
files <- c("1litres 1.txt", "1litres 30.txt", "3litres 5.txt")
file.create(files)
RenameWithNums()
list.files()
setwd("..")
RemoveDirs("RenameWithNums_test")
Documentation reproduced from package filesstrings, version 0.4.0, License: GPL-3

Community examples

Looks like there are no examples yet.