Reputation: 35
I am currently using file.rename
and wish to include a dd.mm.yy
at the very end of the new file name.
file.rename('x.xlsx','x DD.MM.YY.xls')
Upvotes: 0
Views: 90
Reputation: 3116
fname = "x"
date=as.character.Date(format.Date(Sys.Date(),"%d.%m.%y"))
fmt=".xlsx"
newname=paste0(x,date,fmt)
file.rename("x.xlsx",newname)
Upvotes: 1