I am using the code below. Changing the to and from path. No action occurs when i run it. No errors either.
Sub lwk() Const sDirFr As String = "C:\Users\Lucas\Desktop\From" Const sDirTo As String = "C:\Users\Lucas\Desktop\To" Dim sFile As String Dim iRow As Long For iRow = 2 To Cells(Rows.Count, "A") sFile = Cells(iRow, "A").Value2 If Len(Dir(sDirFr & sFile)) Then Name sDirFr & sFile As _ sDirTo & sFile & " - " & Cells(iRow, "A").Value2 End If Next iRow End Sub
Bookmarks