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 sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FileCopy Help

Status
Not open for further replies.

dodgyone

Technical User
Jan 26, 2001
431
GB
Hi...

I'm trying to use filecopy but it doesn't seem to work...

Private Sub Command1_Click()
FileCopy "c:\test1\1.mdb", "c:\test2\1.mdb"
End Sub

...For some reason it only works if the file is in the root directory which seems pretty strange to me. It will not copy files in a direcory..

Thanks
 
I tested your code and it works perfect by me. What king of error are you getting?
 
in re: FileCopy "c:\test1\1.mdb", "c:\test2\1.mdb"
Does the folder test2 already exist? If not, won't work. Use the MkDir statement to create the folder first:

MkDir "c:\test2"
FileCopy "c:\test1\1.mdb", "c:\test2\1.mdb"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top