Home > Archive > Programming with dBASE > December 2005 > writing files to a CD from Dbase









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author writing files to a CD from Dbase
Linda C. Baker

2005-11-10, 8:23 pm

I use the code below in a form to copy certain files to a floppy disk.
How can I do this for a CD? Does it vary depending on the version of Windows and what CD burning software is being used? I tried just changing "A:/" to "D:/" and got the error "Error creating file".

Should I just copy the files to a directory such as c:\CDtemp and then tell the user to copy the files in that folder to a CD using whatever CD software they have or is there a simple way to automate this? Thank you.

Function DISKPUSHBUTTON_onCli
ck
store true to form.progress1.visible
store true to form.text3.visible
local afiles, afileno
private nfile
afiles ={"FILE1.DBF", "FILE2.DBF", "FILE3.DBF"}
afileno = alen(afiles)
store afileno to form.progress1.rangemax

for i = 1 to afileno
nfile = afiles[i]
form.copyfiles(nfile)
next
MSGBOX("Download is Complete!","Download Files",64)
form.close()
Return

Function copyfiles(nfile)
local ofile
ofile = "a:/" + nfile
new File().copy(nfile, ofile)
store form.progress1.value + 1 to form.progress1.value
Return

Bruce Beacham

2005-11-11, 8:23 pm

Linda C. Baker wrote:

> How can I do this for a CD? Does it vary depending on the version of
> Windows and what CD burning software is being used? I tried just
> changing "A:/" to "D:/" and got the error "Error creating file".


I do too.

> Should I just copy the files to a directory such as c:\CDtemp and
> then tell the user to copy the files in that folder to a CD using
> whatever CD software they have or is there a simple way to automate
> this? Thank you.


Windows Explorer usually works for me and my users, but I have known it
get into trouble when other CD-writing software thinks it owns the CD
writer.

But that's hardly an automated solution.

I think this is a weakness in dBASE and it would be worth bringing it up
in the bug-reorts newsgroup to attract dBI's attention to it. It may
get more attention than more abstract bugs because I imagine it affects
dQuery's useability, which is what dBI's efforts seem largely focused on.


Bruce beacham
Charles Crume

2005-11-11, 8:23 pm

Why not use CD-RW (they look like disk drives to the op-sys).

Charles...


"Bruce Beacham" <bbeacham@beacham.no-spam.co.uk> wrote in message
news:ZO7rGlw5FHA.1520@news-server...
> Linda C. Baker wrote:
>
>
> I do too.
>
>
> Windows Explorer usually works for me and my users, but I have known it
> get into trouble when other CD-writing software thinks it owns the CD
> writer.
>
> But that's hardly an automated solution.
>
> I think this is a weakness in dBASE and it would be worth bringing it up
> in the bug-reorts newsgroup to attract dBI's attention to it. It may get
> more attention than more abstract bugs because I imagine it affects
> dQuery's useability, which is what dBI's efforts seem largely focused on.
>
>
> Bruce beacham



Bruce Beacham

2005-11-13, 11:23 am

Charles Crume wrote:
> Why not use CD-RW (they look like disk drives to the op-sys).


I'll try that. Does software behave differently with that rather than
a CD-R?


Bruce
Charles Crume

2005-11-13, 1:23 pm


"Bruce Beacham" <bbeacham@beacham.no-spam.co.uk> wrote in message
news:90pS2cH6FHA.1228@news-server...
> Charles Crume wrote:
>
> I'll try that. Does software behave differently with that rather than a
> CD-R?
>
>
> Bruce


What software are you refferrig to? dBASE?

CD-R requires the CD writing software, but CD-RW is formatted so it looks
like a disk drive. This is an operating system/driver issue not one for
applications such as dBASE.

Charles...


Bruce Beacham

2005-11-14, 7:23 am

Charles Crume wrote:

> What software are you refferrig to? dBASE?


No, disk-controlling software. But you've then answered the question.
Thanks.


Bruce
Linda C. Baker

2005-11-15, 11:23 am

I tried it with a CD-RW today and I still get the same error message,
"Error creating file". I have Windows XP. Is this because in Windows XP, you have to write the files to a certain directory first and then you tell it to write the files and it actually does it. Does it work for other versions of Windows? What is the
best way to automate this process for the user in XP? Thanks.

Charles Crume Wrote:

> Why not use CD-RW (they look like disk drives to the op-sys).
>
> Charles...
>
>
> "Bruce Beacham" <bbeacham@beacham.no-spam.co.uk> wrote in message
> news:ZO7rGlw5FHA.1520@news-server...
>
>


Arlindo Costa

2005-12-13, 9:23 am

Have you tried copying the files directly to the "Application
Data\Microsoft\CD Burning\" folder

Arlindo Costa


"Linda C. Baker" <lbaker@sboa.in.gov> escreveu na mensagem
news:y3AVCLj5FHA.348@news-server...
>I use the code below in a form to copy certain files to a floppy disk.
> How can I do this for a CD? Does it vary depending on the version of
> Windows and what CD burning software is being used? I tried just changing
> "A:/" to "D:/" and got the error "Error creating file".
>
> Should I just copy the files to a directory such as c:\CDtemp and then
> tell the user to copy the files in that folder to a CD using whatever CD
> software they have or is there a simple way to automate this? Thank you.
>
> Function DISKPUSHBUTTON_onCli
ck
> store true to form.progress1.visible
> store true to form.text3.visible
> local afiles, afileno
> private nfile
> afiles ={"FILE1.DBF", "FILE2.DBF", "FILE3.DBF"}
> afileno = alen(afiles)
> store afileno to form.progress1.rangemax
>
> for i = 1 to afileno
> nfile = afiles[i]
> form.copyfiles(nfile)
> next
> MSGBOX("Download is Complete!","Download Files",64)
> form.close()
> Return
>
> Function copyfiles(nfile)
> local ofile
> ofile = "a:/" + nfile
> new File().copy(nfile, ofile)
> store form.progress1.value + 1 to form.progress1.value
> Return
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com