excel vba copy files

  • Thread starter Thread starter Gabriel
  • Start date Start date
G

Gabriel

Hello,

I have a two columns : one with the path and one with the file name.
Can anyone show me how to create a macro that copy those files to
C:\Temp

So for each file (column B), it will use its path (column A) and makes
a copy of that file to C:\Temp until all the files have been copied.

Thank you in advance
Gabriel
 
You can use FileCopy

You can loop through the list
If you need help post back

Sub A()
With Sheets("sheet1")
FileCopy .Range("A1").Value & .Range("B1").Value, "C:\" & .Range("B1").Value
End With
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top