• 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: How can I differentiate a jump drive folder from a HD folder of the same name?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How can I differentiate a jump drive folder from a HD folder of the same name?


  • Subject: Re: How can I differentiate a jump drive folder from a HD folder of the same name?
  • From: Bill Cheeseman <email@hidden>
  • Date: Fri, 10 Sep 2010 14:52:27 -0400


On Sep 10, 2010, at 2:32 PM, Jim Brandt wrote:

Disk "HD1" points to the HD, not to the jump drive. That's my point ... they both have the same name. I need to know how to be able to refer to them individually.

I was struggling with a similar problem the other day. Basically, every technique I know of to get a disk in AppleScript relies on the name of the disk. Thus, when you have duplicate disk names, you always get the same one -- the first one that AppleScript finds with the given name. I consider this a bug in the Finder and/or System Events and/or AppleScript, because there are legitimate circumstances where you might have disks mounted that have identical names.

That isn't quite the scenario you described, but it's close.

The solution I hit on was to put a unique Spotlight comment in each disk's Get Info window, as a sort of tag, then use a script like this:

tell application "Finder"
   set thisID to id of first disk whose comment contains "MP"
   tell disk id thisID
       -- do something with it
   end tell
end tell

Maybe you can adapt this technique to your scenario.

--

Bill Cheeseman - email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Re: How can I differentiate a jump drive folder from a HD folder of the same name? (From: Jim Brandt <email@hidden>)

  • Prev by Date: Re: How can I differentiate a jump drive folder from a HD folder of the same name?
  • Next by Date: Re: How can I differentiate a jump drive folder from a HD folder of the same name?
  • Previous by thread: Re: How can I differentiate a jump drive folder from a HD folder of the same name?
  • Next by thread: Re: How can I differentiate a jump drive folder from a HD folder of the same name?
  • Index(es):
    • Date
    • Thread