Hi,

Can anyone tell me how I can do the following:

I need to copy a file from one location on my hard drive to another. I want to be able to overwrite existing files and be able to trap any errors that occur.

The code I use is as follows:
Code:
Dim fso as New FileSystemObject
Dim sSource as String
Dim sTarget as String

fso.CopyFile sSource, sTarget
By default this will overwrite existing files, but how can I check if there are errors?

Also, what are the other alternatives to using FileSystemObject to copy files, and which is the *best* way to do it?

Thanks very much,

dhartigan