I just found there are 2 functions file.rename() and rename.files() to rename computer files.
Syntax:
rename.files(dir, pattern, replacement)
dir - Path to the directory for which you want to change the file names.
pattern - Pattern in filename to replace.
replacement - ext to replace the pattern with.