title: VBA Datelastmodified of a file which path is listed in column
body: <p>i have a column : </p>
  
  <pre><code>            A 
  P:\Desktop\folderdestination\test.txt
  P:\Desktop\folderdestination\test2.txt
  </code></pre>
  
  <p>and i want to know the date last modified  of the files in the column . Can you help me please ? </p>
  
  <pre><code>        Set workboo = Workbooks.Open("P:\Desktop\Column.xlsx")
          Set worksh = workboo.Worksheets("date_last_modified")
          Dim FSO As FileSystemObject
          Dim rngCell As Range
          Dim rngFiles As Range
          dim destinationfolder as string
  dim dateLast as date
          destinationfolder="P:\Desktop\folder"
          lastcolumn = Cells(1, Cells.Columns.Count).End(xlToLeft).Column
               For icol = 1 To lastcolumn Step 2
               lastLigne = Cells(Rows.Count, icol).End(xlUp).Row
                For Each rngCell In rngFiles.Cells
                strFile = Right(rngCell.Value, Len(rngCell.Value) - InStrRev(rngCell.Value, "\"))
          'without extension    
          Filename = Left(strFile, (InStr(strFile, ".") - 1))
          filepath = worksh.Cells(rngCell).Value
  dateLast=Filedatetime(rngCell.Value)
      If Dir(destinationFolder &amp; dateLast &amp; strFile, 16) = "" Then
          FSO.CopyFile rngCell.Value, destinationFolder &amp; dateLast &amp; strFile
         End If
  </code></pre>