• 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 to get all file paths from the clipboard
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get all file paths from the clipboard


  • Subject: Re: How to get all file paths from the clipboard
  • From: KOENIG Yvan <email@hidden>
  • Date: Fri, 17 Dec 2010 00:10:24 +0100


Le 16 déc. 2010 à 22:59, David Crowe a écrit :

If you have a list of files on the clipboard (e.g. CMD-C in the Finder) the command "the clipboard" produces a text string with one file name (not the full path) on each line.

The command:
the clipboard as «class furl»
produces the full path name -- but only of the first item.

The command
POSIX path of (the clipboard as «class furl»)
produces the full UNIX-style path -- but still only of the first item.

How can one get the complete list of full path names from the clipboard?

The app behave correctly.

When you select several files from the Finder, they are all in the same folder.
So it's efficient to store only one full path and a list of names.

set a_full_path to (the clipboard as «class furl») as text
(*
Macintosh HD:Important:pour ebay:2010_11_23 à 12.17.47.jpg
*)
set all_names to the clipboard as text
(*
2010_11_23 à 12.17.47.jpg
Klicka för att stänga fönstret-1.jpeg
ligne droite.jpeg
pichet YK, jarre AC.jpeg
soucoupe YK.jpeg
*)
tell application "System Events" to set the_container to path of container of disk item a_full_path
(*
Macintosh HD:Important:pour ebay:
*)

A simple loop will built the complete set of full paths.

Yvan KOENIG (VALLAURIS, France) vendredi 17 décembre 2010 00:10:19




 _______________________________________________
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: How to get all file paths from the clipboard
      • From: Shane Stanley <email@hidden>
References: 
 >How to get all file paths from the clipboard (From: David Crowe <email@hidden>)

  • Prev by Date: Re: Was: Re: What Use Autofill
  • Next by Date: Re: How to get all file paths from the clipboard
  • Previous by thread: Re: How to get all file paths from the clipboard
  • Next by thread: Re: How to get all file paths from the clipboard
  • Index(es):
    • Date
    • Thread