|
|
Burn a CD-R without using a temporary image
here's my "advanced" burndir script which lets you specify a directory AND a volume name for the cd. (i like having my cds pop up with pretty names on the desktop). it also detects if you're using a superdrive or regular cd burner and picks the appropriate device for you. it also does error checking if you leave out a cdname, it defaults to the directory specified, but chopped.
so you can even do stuff like
burndir .
and if . is, /Users/username/Documents it will name the cd Documents, instead of "."
i tried to cover every possibility. here it is, written in ruby (ruby comes with os x)
enjoy!
---
Combo Drives Are IODVDServices
Nice script except that Combo drives (as the one in my iBook) are "IODVDServices" and the test doesn't seem to catch this. There's probably a way to test DVD-ROM instead of -RW but I just skipped the test and put dev=IODVDServices directly as a cdrecord argument...
Combo Drives Are IODVDServices
could you give me the output of
so i can fix it?
---
Burn a CD-R without using a temporary image
And here is the perlocratic response:
#!/usr/bin/perl
if(@ARGV < 1 || @ARGV > 2) {
warn "Usage: burndir directory [cd name]\n";
exit 1;
}
# detect superdrive or cd burner
chomp($drive = `system_profiler SPIDEDataType | grep DVD-RW`);
$burnerType = ((length $drive == 0) ? "IOCompactDiscServices" : "IODVDServices");
# get variables
$dir = shift;
$cdname = shift;
$cdname = $dir unless $cdname;
$cdname =~ s#.*/##;
# burn the sucker
system "mkisofs -V \"${cdname}\" -J -r \"${dir}\" | cdrecord dev=${burnerType} -v -", "\n";
Note, also, that you can get cdrecord using OpenDarwin's "port" command:port install cdrtools Enjoy
Burn a CD-R without using a temporary image
your script doesn't handle the burndir . option correctly (hence why i use File.expand_path)
Burn a CD-R without using a temporary image
Sure seems to take a long time to pull from that System Profile bit. Could you get the necessary info from here...
Burn a CD-R without using a temporary image
i agree that it takes awhile. however it's a small price to pay for burning a cd which usually takes a few minutes.
Improved script
Impoved to handle combo drives as well:
|
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:Hints1 new Hints in the last 24 hoursComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.09 seconds |
|