Explain how this works to me.

Hello everyone, I found this on another forum for burning VIDEO_TS folders. I understand that it gets the info of the folder, uses that as the name but i was hoping for an explanation on where the .iso file is create and where is it burned because I keep getting an error before the burn saying it cannot burn multiple segments or something.

Basically I am just looking for comment explaination for the script because the original writer did not put any

Thank you in advance.

on open this_folder
tell application “Finder”
set ginfo to (get info for this_folder)
set disp_name2 to name of ginfo
set POSIX_source to POSIX path of this_folder
set POSIX_file to POSIX path of (choose folder with prompt “Choose a folder to save image in:”)
display dialog “Would you like to also burn the image to DVD?” buttons {“No”, “Yes”} default button 2
if button returned of result is “Yes” then
set burning to "/usr/bin/hdiutil burn -noverifyburn " & POSIX_file & “” & disp_name2 & “.iso”
set burning to “”
end if
end tell

do shell script ("hdiutil makehybrid -udf -udf-volume-name \"" & disp_name2 & "\" -o \"" & POSIX_file & "" & disp_name2 & ".iso\" \"" & POSIX_source & "\"")
tell me to activate
display dialog "Please insert a blank DVD"
do shell script ("" & burning & "")
tell me to activate
display dialog "DVD image/burn complete"

end open

Hi mogley,

could it be, that you have space characters in the path to the destination folder?

Replace this line, then spaces don’t matter

set burning to "/usr/bin/hdiutil burn -noverifyburn " & quoted form of (POSIX_file & "" & disp_name2 & ".iso")

Thank you,
OK, well that solves that issue but I am also looking to modify this script to suit my purpose a little better. I am looking for simple comments for this script to better explain what it does, I am pretty familiar with scripting applications but I am not so familiar with UNIX commands as I should be.

I recommend to read the man page of hdiutil, this is the main part of the script

I have no desire to discourage your AS incentives, but I wouldn’t go for any serious disc burning from within Applescript.
This is fairly complex low-level stuff - with too much error-handling that plain vanilla Applescript can handle.
Use Toast, BurnAgain, or any of that kind of apps…!