
Sub copyfiles()
destpath = "C:UsersAntonioDesktop"
LR = Cells(Rows.Count, "B").End(xlUp).Row
For j = 2 To LR
If Range("A" & j) = "E" Then
fname1 = Range("BL" & j).Value
fname2 = Right(fname1, Len(fname1) - InStrRev(fname1, ""))
' MsgBox fname1 & vbLf & destpath & fname2
FileCopy fname1, destpath & fname2
End If
Next
End Sub |
