title: copy csv file to new file in lua
body: <p>Can you copy a file in lua? Is this possible? 
  You would probably think just insert "devices" into new file however, that creates a new string in each loop -a loop that I did not include in this snippet.</p>
  
  <pre><code>file = io.open("temp.csv", "a")
  file:write(devices)
  
  file = io.open("log.csv", "w")
  file:write("")   
  
  if (count = 15) then
  
       --copy "temp.csv" to "log.csv"
  
  end
  </code></pre>