title: CopyFiles using spreadsheet columns for source and destination
body: <p>I have a spreadsheet with a column "D" that has a list of file paths, and there are about 2500 files in this column. In column "E", I have a list of equal size with the new destination file path. I want to copy all the files in column D to the locations in column E. I know it's possible using a Python / Basic macro in LibreOffice, but I can't seem to get it right.</p>
  
  <p>This is the VBA code I found while searching, but unfortunately it doesn't work with LibreOffice Calc.</p>
  
  <pre><code>Sub Copy_Files()
      Dim cell As Range
      For Each cell In Range("D1", Range("D" &amp; Rows.Count).End(xlUp))
          FileCopy Source:=cell.Value, Destination:=cell.Offset(, 1).Value
      Next cell
  End Sub
  </code></pre>
  
  <p>I don't know any Python, but if someone put me on the right track I could work it out.</p>