PDA

View Full Version : Disk Utility - Format to FAT32 in Applescript - is this possible?




steevg
Jul 26, 2009, 06:04 AM
hi,

I'd like to format an external Compact Flash card using an Applescript if possible.

Just wondering "if" it's possible, and how I might do it? I've read several posts which identify the use of Disk Utility to do the job, but can't find the actual script to do the format.

Any comments or help would be very much appreciated.

Thanks



shesmu
Jul 26, 2009, 04:02 PM
I doubt this is possible directly via AppleScript, but you can use diskutil command line tool (do shell script).

Eraserhead
Jul 26, 2009, 04:14 PM
How often do you need to format something for this to be worthwhile?

steevg
Jul 27, 2009, 05:34 AM
Thanks for the responses . . . I found this - will this work?

do shell script "diskutil eraseDisk \"MS-DOS FAT32"\ NewDiskName /Volumes/CurrentDisk"


Eraserhead:
Not sure what you're asking here
"How often do you need to format something for this to be worthwhile? "

Just looking for a way to erase a CF card in Mac OS!

Thanks

Eraserhead
Jul 27, 2009, 01:53 PM
/Applications/Utilities/Disk Utility.

No scripting required.

steevg
Jul 27, 2009, 02:29 PM
Eraserhead,

Ahhhh sorry, I'm being a bit thick, I understand what you're saying now!

/Applications/Utilities/Disk Utility.

No scripting required.

It's the end product of an AppleScript project I'm working on, and I'd simply like the facility (if possible) for the Compact Flash card to be formatted once I've finished using it!

But thanks anyway!