Copying and renaming files on disk

  • Thread starter Thread starter Tim C
  • Start date Start date
T

Tim C

From within VBA, I need to copy files from one directory to another, and
then change some of the file extensions.

Any hints to get me started?

Thanks,
Tim C
 
sPath = "C:\MyDir1\"
sPath2 = "D:\MyFolder1\MyFolder2\"

Filcopy sPath & "myfile.xls", sPath2 & "Myfile.dat"

You can loop through the files using the code example for Dir
 

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