Experience with diskUtil

I am trying to use a shell script to run the diskutil.

The command I am trying to run is : diskutil eraseVolume “Journaled HFS+” “newName” “VolumeToErase”

I know this works via terminal. My AppleScript Studio version looks like this:


do shell script "diskutil eraseVolume " & quoted form of (format) & " " & quoted form of (NewName) & " " & quoted form of (selectedDstVol) 

This generates a general diskutil error. Not much to go on there.

Anyone else have some experience with this?

Dee

Just for other’s use, I have solved the problem!

It would seem that, for whatever reason, the options are not options when running from a “do shell script”

working command:


do shell script "diskutil eraseVolume " & quoted form of (format) & " " & quoted form of (NewName) & " " & quoted form of "bootable" & " " & selectedDstVol

just incase anybody else is interested

dee