Copy database file to CD-Writer

Malcy

Registered User.
Local time
Today, 23:37
Joined
Mar 25, 2003
Messages
584
Hi
Does anyone know how I can use VBA to copy my backend database onto a CD-Writer?
I have the application in two sites and in both cases the paths are identical - a directory in the C:\ drive and the CD-Writer is in both cases the D:\ drive.
I tried using FileCopy giving first the source path and then the destination path, so it looked like this:

Dim strName1 As String ' Current name/location of DB
Dim strName2 As String ' New name/location of DB

strName1 = "C:\DataFiles\MicaPharm\MgmMethBe.mdb"
strName2 = "D:\MgmMethBe.mdb"

FileCopy strName1, strName2

But I got an Access error saying bad file name or number. I am guessing it doesn't like the D:\ drive even though it had a blank CD in the drive waiting.
I need to find a way of automating it since my users are suggesting that using Windows Explorer is a ad too complicated?!?
Any ideas?
Thanks in anticipation of any help

Malcy
 
This might be stating the obvious but wouldn't you need to have the CD writer program launch, you can't just copy files to CD's like you can with floppies, unless there has been advances that I'm yet to know about with the new windows version (I'm still using 98)

Rachael
 
Thanks but yes Windows XP has moved on a lot. You copy to the D:\ drive and then it stores the files awaiting the writeinstruction - which you action from <File> <Write files to disc>.
So I think ?!? it ought to be relatively simple but I must be missing something somewhere.
Thanks for the suggestion. ALl best wishes

Malcy
 

Users who are viewing this thread

Back
Top Bottom