Format a disk on MacOS X

Thierry th.douez at gmail.com
Fri Feb 6 09:03:26 CST 2009


Le 6 févr. 09 à 11:16, Ludovic Thébault a écrit :

> Hello,
>
> I want to make a button to format a disk with the shell (in FAT16  
> which is impossible to do with the GUI of MacoS X).
> Here my script :
>
>   get shell("df")
>   put line lineoffset("/Volumes/"&the label of btn "disk", it) of  
> it into tdisk
>   set the itemdel to " "
>   put item 1 of tdisk into tdisk
> -- return /dev/Disks4s1
>   get shell("diskutil umount "&tdisk)


typo or error in your shell ?

the option for diskutil is unmount not umount !!!!

i did try it with success !

HTH
Regards,
Thierry


>  -- Fail to unmount (but works directly in the terminal)
>   get shell("diskutil partitionDisk "&tdisk&" 1 MBRFormat  
> "&quote&"MS-DOS FAT16"&quote&&quote&fld "newname"&quote&&"100%")
> -- don't work because the disk is always mounted
>
> Any idea ?
>
> Thanks.
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list