Automating DVD duplication

Hi,

as I just have to copy about 500 DVDs (UDF, movies, but not commercial disks, no DRM) to an external HD I thought this could be made easier with a script.

How I do it now is putting in a DVD, dragging and dropping (while holding down the option key) to the external HD, wait, check if it’s done and eject. What would be better is iTunes-like behavior of the finder: Putting in a DVD, finder copies automatically and ejects the disk when done. This would free me from the manual copying AND I wouldn’t have to check if it’s done, because I would hear and see the disc eject.

I found a script on Apples discussion forum, but it doesn’t work yet … this is what I have so far:

on adding folder items to volumesFolder after receiving theDisk
	delay 5 --This is to allow time to properly mount the disc. It may not be needed
	
	try
		--get the name of the folder
		set theVolume to item 2 of theDisk
		set diskName to (name of theVolume as string)
		
		if (do shell script "diskutil info /dev/disk2") contains diskName then
			--It appears to be an optical disk
			--add something here to copy to the disk. For example:
			tell application "Finder"
				duplicate disk diskName to "Volumes:FILME:"
				--Eject the disk
				eject disk diskName
			end tell
			
		end if
	on error msg
		tell application "Finder"
			activate
			display dialog msg
		end tell
	end try
	
	return 0
end adding folder items to

What I get are errors like this one:

Can’t make name of alias “MYMOVIE:” into type string.

So, the part where it tries to get the name of the DVD doesn’t work … any ideas or suggestions?

Hi Udo,

AppleScript doesn’t know the name of an alias specifier, only the Finder, System Events or info for (which calls also System Events) know.


.
 set diskName to name of (info for theVolume)
.

Consider that the event variable theDisk contains always a list of alias specifiers.

Thanks, but I don’t even know what that means. Frankly, I don’t really understand the script. I think. In the beginning … how does AppleScript even know what “theDisk” is? And why do I have to go from “TheDisk” to “theVolume” to “diskName”? The DVD is mounted and has a name … doesn’t the finder kind of know that?

that helped, actually. Now the script runs a little bit further and I get the error:

“Finder got an error: Can’t make “Volumes:FILME:” into type folder”

I spent the last 3 hours reading and googling … I still don’t even know what that means … :confused:

After some more googling I found the solution:

http://automatorworld.com/forum/topic.php?id=601#post-1651

Exactly what I imagined :slight_smile: