I already coded what I think should do the trick but it doesn't seem to work.
Lfiles = Dir("C:\SomeFolder\")
Do Until Lfiles = ""
OldFilePath = "C:\Folder1\" & Lfiles
NewFilePath = "C:\Folder2\" & Lfiles
If Dir(NewFilePath) = Dir(OldFilePath) Then Kill (NewFilePath)
Name OldFilePath As NewFilePath
Lfiles = Dir()
Loop
It only works for the first files it find in DIR("C:\SomeFolder\") then is stops. Can someone point me in the right direction to solve this problem?
Lfiles = Dir("C:\SomeFolder\")
Do Until Lfiles = ""
OldFilePath = "C:\Folder1\" & Lfiles
NewFilePath = "C:\Folder2\" & Lfiles
If Dir(NewFilePath) = Dir(OldFilePath) Then Kill (NewFilePath)
Name OldFilePath As NewFilePath
Lfiles = Dir()
Loop
It only works for the first files it find in DIR("C:\SomeFolder\") then is stops. Can someone point me in the right direction to solve this problem?