I am trying to write an Excel VBA macro that will loop through a list of folder paths, fetch all the files inside these folders and copy them to a single folder. Everything works fine until the macro reaches to a file that already exists in the destination folder, and then it returns the message: "run time error 70 - permission denied"
here's the code I'm currently using:
FSO.CopyFolder Source:=FromPath, Destination:=topath
If possible, I would prefer to overwrite the duplicate files.
Thanks in advance!