• 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: Local and remote disks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Local and remote disks


  • Subject: Re: Local and remote disks
  • From: Levon Spradlin <email@hidden>
  • Date: Mon, 10 Sep 2007 11:24:06 -0500
  • Thread-topic: Local and remote disks

Title: Re: Local and remote disks
Here is one I placed in my Finder toolbar and run from any location I browse to:

tell application "Finder"
    if exists (front Finder window) then
       set thePath to POSIX path of ((target of front window) as alias)
    else
       set thePath to "" -- or whatever, if needed
   end if
   display dialog "The path to this folder is:" default answer thePath
end tell


Levon Spradlin
Desktop Publishing Technology Manager, Assessment & Information
Pearson
512-989-5300 x 3989
email@hidden







From: Harald Schneider <email@hidden>
Date: Mon, 10 Sep 2007 12:28:29 +0200
To: Applescript Mailing List <email@hidden>
Subject: Re: Local and remote disks


Yes, that's how I've currently solved it:
I issue a "df" shell command and parse its output.

Can I retrieve the POSIX path from a Finder object ?


Thank you very much,
Harald


Emmanuel wrote:
> At 10:34 AM +0200 9/10/07, Harald Schneider wrote:
>> Thanks - but what if you have 2 disks named "Macintosh HD", one local
>> and one mounted remote volume ?  Querying by name always returns true.
>
> The posix path of a remote volume starts with /Volumes, furthermore
> different disks with the same name will have different posix paths, such
> as /Volumes/Macintosh HD, /Volumes/Macintosh HD1 etc.
>
> Emmanuel
> _______________________________________________
> 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
>

 _______________________________________________
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

****************************************************************************

This email may contain confidential
material. If you were not an intended recipient,
Please notify the sender and delete all copies.
We may monitor email to and from our network.

 ***************************************************************************

 
 _______________________________________________
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

  • Follow-Ups:
    • Re: Local and remote disks
      • From: Harald Schneider <email@hidden>
References: 
 >Re: Local and remote disks (From: Harald Schneider <email@hidden>)

  • Prev by Date: FileMaker Value Lists
  • Next by Date: InDesign CS3 Text Formatting in Text Overflow Boxes
  • Previous by thread: Re: Local and remote disks
  • Next by thread: Re: Local and remote disks
  • Index(es):
    • Date
    • Thread