[Gambas-user] test a DVD device

nando nando_f at ...951...
Fri May 13 20:10:50 CEST 2005

An alternate method I used was
external USB drives each with 200B IDE's in them.

Although I used a shell script and not Gambas, that
is on the list of changes to do.

I have 8 drives where each drive is to be used every
four days.  The script knows which drive ought to
be plugged in because each drive has one identifier file
that is queried.

This method is far easier than DVD especially
because increasing file sizes overtime would 
make automated DVD limiting.  IDE drives are
large and cheap.


---------- Original Message -----------
From: neil lewis <gibsonsphoto at ...247...>
To: gambas-user at lists.sourceforge.net
Sent: Fri, 13 May 2005 12:06:08 +0100
Subject: [Gambas-user] test a DVD device

> Hi all,
> I have a couple of queries.
> I'm writing a simple backup program in Gambas for a friend who wants 
> to be able to run automated backups between 1GB and 4GB in size. We 
> decided that a DVD recorder would be the simplest route for this.
> The program currently uses a set of GUI based configuration tools to 
> set basic configuration, create profiles, manage media, etc. and a 
> non-gui part which to be run from CRON to carry out the actual process.
> My problem is trying to test the drive to see if it's ready for use, 
> ie a DVD is present, it is blank but formatted or it has already 
> been used.
> How can I test a DVD writer to see:
>     a) If there is a disk present in the drive
>     b) If present, whether it is formatted and ready for use
>     c) If present and formatted, whether it already contains data
> If possible, I'd also like to be able to read the disk label so that 
> the program can identify if it should be overwritten or the process 
> should abort with an error.
> I've tried to start by using TRY file = DIR(/dev/dvdram, "*.*")  
> where file is defined by DIM file as STRING[] at the start of the 
> sub. I want to read ERROR after this test to decide whether to write 
> to the DVD as a new disk (-Z option) or in overwrite mode (-M option)
>  but I always get an error, blank or not.
> I'm using EXEC["growisofs", "-Z" (or "-M"), device, "-R", "-J" 
> Path_to_Files]  to burn the files to the DVD. device is currently 
> /dev/dvdram. This part works fine.
> Any help would be appreciated.
> Neil Lewis.
> -------------------------------------------------------
> This SF.Net email is sponsored by Oracle Space Sweepstakes
> Want to be the first software developer in space?
> Enter now for the Oracle Space Sweepstakes!
> http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
------- End of Original Message -------

More information about the User mailing list