Thread: FileCopy
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
John Green[_2_] John Green[_2_] is offline
external usenet poster
 
Posts: 58
Default FileCopy

Don,

You are right. You could use something like the following to preeventoverwriting an existng file:

If Dir("C:\Data.xls") = "" Then
FileCopy "C:\MyFiles\Data.xls", "C:\Data.xls"
Else
MsgBox "File already exists"
End If


--

John Green - Excel MVP
Sydney
Australia


"Donald Lloyd" wrote in message ...
Hi,

I'm looking at using the FileCopy function to copy a file(s) from one drive
to another.
Am I right in observing that this function will overwrite a File without
warning ?

Regards,
Don

--