Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy a file, replace existing 1

Status
Not open for further replies.

grnzbra

Programmer
Mar 12, 2002
1,273
US
I am trying to copy a file from one folder to another. Somewhere along the line, I came up with the command:

objFSO.CopyFile strIn, strOut, OverwriteExisting

It does a nice job the file is copied. But if it is copied again, I get a message saying that the file already exists. How can I get it to overwrite the existing file?
 
Try this:
Code:
objFSO.CopyFile strIn, strOut, TRUE

JJ
[small][purple]Variables won't. Constants aren't[/purple][/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top