Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

steevg

macrumors member
Original poster
Aug 5, 2008
45
0
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

macrumors newbie
Jul 26, 2009
17
0
Ukraine
I doubt this is possible directly via AppleScript, but you can use diskutil command line tool (do shell script).
 

steevg

macrumors member
Original poster
Aug 5, 2008
45
0
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
 

steevg

macrumors member
Original poster
Aug 5, 2008
45
0
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!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.