title: Name a CSV based on a cell
body: <p>I use R and am using the following code to combine multiple csv files </p>
  
  <pre><code>&gt; setwd("c:/r data/NASCAR/DK/S1") filenames &lt;- list.files("c:/r
  &gt; data/NASCAR/DK/S1") TEMP_files_appended &lt;-
  &gt; do.call("rbind",lapply(filenames, read.csv, header = TRUE))
  &gt; 
  &gt; setwd("C:/Users/Adam/Documents/NFL 2017/NASCAR/WINSTON/DK/CSV")
  &gt; write.csv(TEMP_files_appended, file ="Daytona2018.csv")`enter code here`
  </code></pre>
  
  <p>My question is how can I instead of having to change the name of the combined file manually every time this one is Daytona2018.csv  i could reference a cell in one of the csv files for example a file named AVG.CSV Cell A1 has text "Daytona_FEB_18_2018"make that the name of the combined files?</p>
  
  <p>Thanks you for your time.</p>