• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Disk mounted
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Disk mounted


  • Subject: Re: Disk mounted
  • From: Richard Morton <email@hidden>
  • Date: Wed, 16 Apr 2003 11:19:49 +1000

On Monday, April 14, 2003, at 03:45 PM, Bernard Azancot wrote:
I have a little script that performs different tasks on an USB disk.

I would like the script to check if this USB disk is mounted and cancel (with an erros message) if it is not.

How would you do ?

set usbDisk to "name_of_the_USB_disk"

set currentDisks to list disks -- a list of names of all mounted volumes

if usbDisk is in currentDisks then
-- do things with the disk
else
display dialog "Your error message here." buttons {"Cancel"} default button 1 with icon 0
end if


Cheers,

Disk O'Boye
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Disk mounted (From: Bernard Azancot <email@hidden>)

  • Prev by Date: Re: Palm Desktop Script 101?
  • Next by Date: Re: Responding to events
  • Previous by thread: Disk mounted
  • Next by thread: Re: Disk mounted
  • Index(es):
    • Date
    • Thread