BatchBurn 3.04 for Windows and OS/2   Martin Vieregg, Germany
Freeware                              info2006 at hypermake.de
                                      January 2006

Homepage:
http://www.hypermake.com


BatchBurn is a set of Freeware batch files for using the Freeware
commandline programs CDRECORD and MKISOFS to burn CD-ROMs.

***Introduction***

CDRECORD is a very good CD writing software, but tedious to use.
I used it for several years but always forgot the commands. Then I
wrote batch files, but forgot how to use the batchfiles. Now these
batchfiles are really simple to use -- and there's no excuse for
forgetting the usage anymore: just type CDHELP.

In 2.00, I've added commands to burn Audio CDs and to create
MP3 files (type CDAHELP).

In 3.00, I've added commands to copy complete CDs (type CDCHELP)
and read chapter "*** HOW TO COPY A WHOLE CD ***".
Then, I've replaced Gogo support (mp3 converter) by Lame, because
of Gogos bad quality. Meanwhile, I've re-added GOGO support.
The CDTIME command enables you starting an arbitrary CMD file
at a specific daytime.

BatchBurn does not use REXX; instead, several batch files use
the commandline program DO.EXE which can also be used separately:
DO without parameters shows a help screen.

In 3.01, DELPATH.EXE has been replaced by DO DELETE.

In 3.02, I've reactivated GOGO support. I've seen that GOGO 3.11 is OK
while 3.13 sounds bad! Then there was a bug in DO: CDLAME did not recurse
into subdirectories. The bitrate has been moved to a variable, type
CDINFO or CDINIT.

In 3.03, I've added an error message in CDHELP, CDINFO and CDINIT if
CDSET has not been found via PATH= statement.
DO.EXE version now 1.30 with >2 GB file support
DO SIZE *.WAV shows the file size in MB and in minutes.

In 3.04, I've added a batchfile cdMP3toWAV.CMD, based on LAME.

***How to get CDrecord***

Windows:
Download the file (1,5 MB)
http://www.geoshock.com/cdrtools/
http://www.geoshock.com/cdrtools/files/cdrtools-2.01-win32-bin.zip

OS/2:
To get the CDrecord main program, visit the Hobbes download page
http://hobbes.nmsu.edu/cgi-bin/h-browse?dir=//pub/os2/apps/mmedia/cd/cd-r
The current CDrecord is version 2.00:
http://hobbes.nmsu.edu/pub/os2/apps/mmedia/cd/cd-r/cdrecord-2_00_os2.zip

***Installation***

CDRECORD has to be installed. Make sure that the directories where 
cdrecord.exe and mkisofs.exe reside are in the PATH statement.

Unpack the BatchBurn archive file to a new directory of your choice. Add 
the directory where the BatchBurn command files are located to your PATH 
statement.

Edit your PATH= statement.

Windows: If you don't know how to edit a PATH statement, visit:
http://www.computerhope.com/issues/ch000549.htm
Right click My Computer and click properties, System Properties,
Advanced tab, Environment Variables.


-----------OS/2 only--------------
Edit your PATH= statement in your Config.sys file.

For long filename support, make sure that the CD driver statement in 
your config.sys includes the /W option:
IFS=C:\OS2\BOOT\CDFS.IFS /W

The commandline program DO.EXE needs EMX.
If you have not the EMX library yet, please visit
ftp://ftp-os2.nmsu.edu/pub/os2/dev/emx/v0.9d
or
http://hobbes.nmsu.edu/cgi-bin/h-browse?sh=1&dir=/pub/os2/dev/emx/v0.9d
If you are not sure if EMX is installed, simply type DO. If DO is running
(showing help screen), it is OK, otherwise not...

Now reboot your system.
---------------------------------

***First steps***

Type CDHELP to get a command overview. Then run CDINIT. One editor 
window will show the free disk space on your drives, and the address
of your CD Writer. The other editor (sometimes exactly below the first
editor window) shows the file cdset.cmd and allows you to change your
user-specific settings. The file is self-explanatory.

Most commands are used without parameters.

To use the commands CDZIP and CDZIPX, you need to have Info-Zip
(Zip.exe) installed.

***How to burn a DATA CD***

1. After the "first steps", simply copy all the files you want to burn to
   the CD_BURNDIR directory you defined while running CDINIT.

   Enter "CDSPACE" to control the size of the data.

   Zipping the files may be preferable to copying them, since zipping
   preserves the extended attributes. To zip your files, open a command
   window and change to the directory you wish to save and then type 
   CDZIP or CDZIPX. Use CDZIPX if you wish to exclude some specific file
   extensions from the CD. (Edit CDZIPX.CMD to choose file extensions to 
   exclude. The selected extensions in the included example are for
   Borland C and Sibyl programming).

2. Creating an image file: 
   Type CDFIRST if you want to burn an empty CD or type CDADD if you
   want to add data to an already existing CD. (Make sure that you have
   enough space on the CD!) CDFIRST always writes "multisession" CDs, so
   you can later add data with CDADD. When using CDADD, the CD to which
   the data is to be added must be in the CD drive.
   
   If you want to burn a single directory, it is not necessary to copy all
   files to your CD_BURNDIR directory. Instead, you can enter a specific
   directory name.
   [C:\] CDFIRSTDIR D:\MyDir
   [C:\] CDADDDIR D:\MyDir
   The name "MyDir" won't appear on the CD. Instead, the subdirectories of
   "MyDir" will appear in the root directory of the CD.

   If you use CDADD or CDADDDIR, the CD must be in your CD drive already,
   since CDRECORD needs to analyze the current data end position.

3. To burn the CD, simply type CDREC. When the burning process is 
   finished, the CD will be ejected.
   
Instead of copying the files to the CD_BURNDIR directory, you can
also ZIP the files. The following commands require the commandline
program ZIP.EXE (Info-Zip).

[C:\MYDIR] CDZIP MyDir_01_2005

creates a Zip file MyDir_01_2005.zip in the CD_BURNDIR directory.
That means this zip file will be placed in the root directory of the CD.

If you type CDZIPX instead of CDZIP, files with a specific file extension
are excluded in the Zip file. To see the list of file extensions, please
open CDZIPX.CMD in an editor and edit the file for your own purpose.


BatchBurn always writes an image file. It does not support burning data
on the fly. But you can concatenate the commands for making an image and 
burning the disc:

cdFirstRec
   runs CDFIRST and CDREC one after another  
cdAddRec
   runs CDADD and CDREC one after another  


CDOPEN opens the tray of the CD drive,
CDCLOSE closes the tray.

Both commands wait for finishing the process. For the CDCLOSE command
that means you get the command prompt back after you have really access
to the CD drive.


*** HOW TO COPY A WHOLE CD ***

If you want to make a copy of a complete CD without the need of accessing
single files, simply type CDCHELP. The CDCLONE commands works independent
from the content (data, audio, data boot).

CDCLONE
copies a CD (single drive).
First, place the source CD into the CD writer drive. Then type CDCLONE and
the CD is read to harddisk (a RAW file, the location is defined while running
CDINIT). Then the program pauses and you should remove the source and insert
an empty CD. After pressing any key,  the new CD will be burned.

CDCLONEA
(clone again), repeats the writing process by using the harddisk data
which has been written while running CDCLONE.

CDCLONE2
is like CDCLONE, but for dual drives, without pause. Place the Source
CD into the second (read-only) drive and the empty CD into the CD Writer.

CDRECISO
can be used if you e.g. have downloaded an ISO file from the internet
(e.g. a Operating System Boot CD) and you want to burn the ISO file to a CD:
CDRECISO d:\downloads\ecs12bootCD.iso
burns a CD from the specific iso file located on the harddisk


*** HOW TO COPY AN AUDIO CD (second possible method) ***

type CDAHELP and follow the instructions! You need to have 1,5 GB
free disk space to burn 80min data CDs. I don't know why 750 MB is not
sufficient, but CDRECORD created an error if there was not enough
free space in the current directory. Here's the help when typing CDAHELP:

1. make an empty directory current                                  
2. make sure that no AUDIO_*.WAV files are in the current directory,
   because they are deleted without warning by CDAREAD              
3. place the source CD into the CD drive (same drive as burning)    
4. type CDAREAD and wait until the drive opens automatically        
5. place a new empty CD into the CD drive                           
6. type CDAWRITE and wait until the drive opens automatically       
7. continue with step 5 if you want to make several copies          


*** HOW TO BURN YOUR OWN WAV FILES TO A NEW CD ***

Use CDWWRITE instead of CDAWRITE. CDWWRITE does not need INF files.
The order of the tracks relates to the alphabetic order, for example:
01.wav
02.wav
03.wav

Don't type 8.wav, 9.wav, 10.wav, because "10" comes before "8" !
If the wav files resides in a FAT partition, the order of copying the
files is relevant, not the alphabetic order! (no idea why) HPFS and
JFS works fine here.

You can see if the *.WAV files fits to a CD or not:

[D:\AUDIO\MYSONGS] DO SIZE *.WAV
Size of D:\AUDIO\MYSONGS is 778 MB
number of tracks: 38
length in minutes: 77.1
length in minutes with 2sec pause between tracks: 78.4

Normally, a CD-ROM holds 74 or 80 minutes of music.
CDWWRITE places 2sec pause between the tracks.

[D:\AUDIO\MYSONGS] DO LISTSIZE *

If a WAV file is found, you'll additionallty get the file size in minutes.


*** HOW TO CREATE MP3 FILES FROM AN AUDIO CD ***

Download Lame or Gogo from hobbes.nmsu.edu:
http://hobbes.nmsu.edu/pub/os2/apps/mmedia/sound/convert
and copy lame.exe or gogo.exe into a directory which is part of the PATH
statement. 

I've chosen to support LAME, because it creates better MP3 files than
Gogo 3.13 or Bladenc. But Gogo 3.11 is also OK and very much faster
than LAME, only Gogo 3.13 sounds bad (it seems to be a bug inside!)

If you want a different bit rate from 128, edit the number "128"
in the batch file CDLAME.CMD/CDGOGO.CMD. If you want to finally store
your music to MP3, I recommend 192, and for MP3 players 128.

Then do the following:

1. make an empty directory current
2. make sure that no AUDIO_*.WAV files are in the current directory,
   because they are deleted without warning by CDAREAD
3. Run CDAREAD or CDAREAD2 to get WAV files from the Audio CD
4. Simply run CDLAME/CDGOGO to convert all WAV files which are located
   in the current directory and in its subdirectories. MP3 files
   which do already exist are overwritten.

CDLAME/CDGOGO executes LAME/GOGO for each WAV file which is located
in the current directory and in all its subdirectories.

To delete all no more necessary *.WAV and *.INF files, type:

DO DELETE *.WAV *.INF

This will recurse into all subdirectories! To omit recursing, type

DO DELETE . *.WAV *.INF


*** HOW TO BURN A MUSIC CD FROM A SET OF MP3 FILES ***

Use cdMP3toWAV. (This batch file requires Lame.)
cdMP3toWAV converts all MP3 files in the current directory to
WAV files.
Now you can burn the WAV files to CD by using CDWWRITE.



*** RUNNING JOBS AT SPECIFIC DAYTIME ***

To execute an arbitrary batch job e.g. at night, use CDTIME:

CDTIME 3:00 CDLAME
converts all WAV files to MP3 files (CDLAME) and begins this
time-consuming job at 3:00  at night / early morning.
The highest valid time value is: 23:59

You can use any CMD filename together with CDTIME.


*** FIXED BUGS ***

In Version 1.00, CDFIRSTREC CDADDREC failed because of a missing hyphen
before "gracetime".
In Version 1.01, a short gracetime can corrupt the CD's; gracetime is
now eliminated.

In 1.03, I have fixed two bugs in cdinit.cmd: cdinit failed if a FAT drive
was current (because of 8.3 limitation); then "do which cdset" produced
a malfunction, now replaced by "do whichfirst cdset" (also do.exe has been
changed for this functionality.)


***Other programs in this package***

The batch files uses two EXE files:

Do.exe       a Freeware program which I have written with various 
             functionalities. Do.exe requires EMX.
             For an overview, simply type DO without parameters,
             for more information, see DO.TXT
Spe.exe      let you set the priority of a program, see SPE.TXT (OS/2 only)

Do.exe replaces a handful of old Freeware exe programs which do not
run properly anymore because of integer overflow. Do.exe also works
if the results are larger than 32 bits, e.g. free disk space larger
than 4 GB. I have written do.exe with Sibyl (Pascal). If you would
like to see any functions added, please send me your suggestions.
At the moment, DO.EXE does not handle files larger than 2 GB, but I will
fix this in a later version.

In 3.01, Delpath.exe has been replaced by DO DELETE.


***Problems***

If CDAREAD and CDAWRITE fails, you probably have not enough harddisk
space. You need 1,4 GB free harddisk space to copy a 0,7 GB file.
To simply copy a CD, type CDCHELP, these commands require only 0,7 GB.

For technical problems, read "CDRecord/2 - FAQ" (cdrecordfaq.htm).

Have fun!

Send comments to info2006 at Hypermake.de