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
 
Back
Top