Copy file to CD using Code


G

Guest

I am using the following piece of code to copy a file from a folder on my c
drive to my cd drive (a quick backup)

Set fs = CreateObject("Scripting.FileSystemObject")
fs.CopyFile COMPACTPATH, backuppath2
Set fs = Nothing

the error I get is

Method 'Copyfile' of object 'IFILESYystem3' Failed

compactpath is c:\folder\data.mdb

backuppath2 is d:

If I drag and drop the file on the D drive it will work correctly, is there
anyway around this in Access
 
Ad

Advertisements

J

John Nurick

Hi Nigel,

Copying to a CD uses a whole different Windows subsystem from copying
between ordinary drives, so I wouldn't expect this to work.

One way round would be to use a special CD driver that imitates a
standard hard drive. Most CD-writing software includes these, I think
(though I can't remember what they're called and have an idea that they
only work with CD-RW discs).

Alternatively you'll need to find a control or utility that can handle
the whole CD-writing process. One such, which I haven't used myself, is
Alex Feinman's CreateCD
(http://alexfeinman.brinkster.net/CreateCD.htm).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top