0

I have the following list of files in a folder:

1.docx
2.docx
3.docx
4.docx
6.txt

I figured out how to mass rename using this code:

file.rename(list.files(pattern="*.docx"), paste0("", 1:4,".docx"))

I have dates in the correct order in a csv file that I would like to append to the end of each filename accordingly.

So 1.docx - date is cell A1; 2.docx - date in A2, etc. Example of final filename: 1 MMDDYY.docx etc. What would this look like?

DataNoob7
  • 191
  • 1
  • 8
  • Hi there. Thanks for the link, but I have come across that one before. I have a list of dates in a csv file that I would like to append to end of each filename (that I renamed in R) from a 1:1 matching fashion. – DataNoob7 Jun 23 '17 at 10:37
  • Perhaps this, I don't know if Stackoverflow allows for third-party software, but I use it. https://www.advancedrenamer.com/ – Bluebird Jun 27 '17 at 18:10
  • Thank you for the resource. I am trying to develop an R code solution because I am immersing myself in R programming. However, if I cannot create one, I have an alternative :D. – DataNoob7 Jun 28 '17 at 02:00

0 Answers0