Nero* includes a nice little executable that lets you control CD/DVD burning via the command line. It is called “NeroCmd.exe” and should be located somewhere in your “C:\Program Files\ahead\Nero\”.
Just call it from the command line with no arguments and it will dump a few pages of documentation** at you to get you started. i.e.
>"C:\Program Files\ahead\Nero\NeroCmd.exe"
As an example of how to put all of its many parameters together, I used it to burn an ISO file to a DVD like so:
C:\Program Files\ahead\Nero>"C:\Program Files\ahead\Nero\NeroCmd.exe" --write --drivename D --real --dvd --image "C:\BACKUPTEMP\NON_COPYRIGHTED_FILE.ISO"
--speed 6 --underrun_prot --no_user_interaction
If you’re curious what you could use something like this for, I wrote a little Python script that will read all of the files in a folder, pull out an ISO file, and burn it to a disk. It runs once a night. After the run it tells me the name of the file it burned and pleads with me to insert a blank disk for its next run.
"""
Autoburn.py
Greg Pinero
January 2006
--
A little script to automate the burning of my ISO files to DVD.
"""
import sys
import os
import shutil
#-----------------------------------------------------------------------------
#USER SETTINGS:
StoredISOsPath=r'C:\DVDBACKUPTEMP'
BurnedISOsPath=r'C:\DVDBACKUPTEMP\haveonDVD'
NeroCMDPath=r'C:\Program Files\ahead\Nero\NeroCmd.exe'
#-----------------------------------------------------------------------------
for filename in os.listdir(StoredISOsPath):
if filename.split(os.path.extsep)[-1].upper()=='ISO':
fullisopath=os.path.join(StoredISOsPath,filename)
launchstring=r'""%s" --write --drivename D --real --dvd --image ""%s"' % (NeroCMDPath,fullisopath)
launchstring+=' --speed 4 --underrun_prot --no_user_interaction' #psuedo line break for code
resultcode=os.system(launchstring)
print resultcode
if resultcode==0:#sucess,move iso
shutil.move(fullisopath,os.path.join(BurnedISOsPath,filename))
print "I sucessfully burned %s to the disk in the tray, please label it accordingly"
print "Please insert a blank DVD into the drive."
else:
print "I hit an error, most likely there was no disk in"
pause=raw_input("Press enter to exit")
sys.exit(resultcode)
print 'no files found'
pause=raw_input("Press enter to exit")
sys.exit(0) #no files found
*You could try CreateCD if you want a free alternative to Nero that offers command line control.
**I read that more documentation is available from Nero, but I didn’t need it.
Update: If you get an error from Nero command from my script try changing this line:
launchstring=r'""%s" --write --drivename D --real --DVD --image ""%s"' % (NeroCMDPath,fullisopath)
to:
launchstring=r'""%s" --write --drivename D --real --DVD --image "%s"' % (NeroCMDPath,fullisopath)
os.system is a delicate lady indeed!