• 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: Getting full file paths on clipboard with AS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting full file paths on clipboard with AS


  • Subject: Re: Getting full file paths on clipboard with AS
  • From: Christopher Stone <email@hidden>
  • Date: Mon, 26 Sep 2011 23:50:37 -0500

On Sep 26, 2011, at 22:24, David Crowe wrote:
If I copy a list of files to the clipboard I can get the full path of the first one by:
{.snip.}
But what I really want is to get all the file paths. Is that possible?
______________________________________________________________________

Hey David,

Any special reason you need to copy them to the clipboard first?  If not try this.

--
Best Regards,
Chris

______________________________________________________________________


tell application "Finder"
try
set fSel to selection as alias list
if fSel ≠ {} then
set {oldTIDS, AppleScript's text item delimiters} to {AppleScript's text item delimiters, return}
set filePaths to fSel as string
set AppleScript's text item delimiters to oldTIDS
end if


filePaths


on error errMsg number errNum
set {cr, sep} to {return, "------------------------------------------"}
set e to sep & cr & "Error: " & errMsg & cr & sep & cr & "Error Number: " & errNum & cr & sep
beep
display dialog e
end try
end tell

 _______________________________________________
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: 
 >Getting full file paths on clipboard with AS (From: David Crowe <email@hidden>)

  • Prev by Date: Re: Getting full file paths on clipboard with AS
  • Next by Date: An Error in Mail
  • Previous by thread: Re: Getting full file paths on clipboard with AS
  • Next by thread: An Error in Mail
  • Index(es):
    • Date
    • Thread