Creating ISO from the Finder
If you’re like me you know that you can create an ISO easily from the terminal with hdiutil. If you’re also like me, you get tired very quickly of typing the same stuff over and over again. If you’re also like me you wish there was a built in way to select a folder in Finder, right click and Create an ISO as easily as you can create a Zip archive. You’re probably saying I wish there was a tool that would allow me to make a script and save it as a Finder contextual item. There is– Automator. The “Create ISO” Contextual Finder Item is simply two steps. The secret ingredient is the “Run Shell Script” action where you will put the handing hdiutil command.
hdiutil makehybrid -iso -joliet -o <name of iso file> “$@”
The $@ is the secret sauce varibale Automator will use so want to make sure you select the “pass input as arguments” in the drop down. This will take the previous action “Get Selected Finder Items” and throw it into the $@ variable in your hdiutil command. I don’t know why Automator uses this variable. It just does and it works so leave it.
You may want to check “Show When Run” so you can edit the path or any options in the hdiutil command.
Save as a Finder plug-in
Example in screenshot below–just replace the “/Users/sean..” thing with whatever you want your default ISO name to be. With the Show When Run selected you can change this on the fly.
October 3, 2007 at 2:59 am
I’ve tried to get this to work, but it just keeps saying “Workflow Failed”. I’m using the following line:
hdiutil makehybrid -iso -joliet -o /Users/Jordan/Desktop/Untitled.iso “$@”
Can you think if anything I may be doing wrong?
October 3, 2007 at 10:59 pm
Is the item you’re selecting in the Finder a folder? The hdiutil…iso requires the item be a directory so if i had a folder full of movies that I wanted to turn into an ISO I’d have to select the folder itself, and not the files.
If you’ve already done that…
try running the hidutil command in terminal, replacing the “$@” with the folder path (e.g. /Users/username/make-me-an-iso)
If it returns an error, that’s causing the workflow to fail.
April 6, 2008 at 10:11 pm
Try “$@/”
hdiutil makehybrid -iso -joliet -o /Users/husk/Desktop/DiskName.iso “$@/”
There seems to be a bug with “Get selected folder items” that requires a slash at the end of “$@” in order for the above to work.
cheers
May 23, 2008 at 3:43 am
I had no luck with any of these permutations until I got rid of the quote marks around the $@/. Then it worked like a champ. I am using Tiger 10.4.9
May 23, 2008 at 8:45 pm
Odd that the syntax varies for the variable. Actually I’m not surprised, Automator especially in Leopard seems to be a bit unpredictable at times. I should add a YMMV to the post.