• 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: Specifying a file using only part of its name.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Specifying a file using only part of its name.


  • Subject: Re: Specifying a file using only part of its name.
  • From: Matthew Smith <email@hidden>
  • Date: Mon, 07 Nov 2005 15:31:08 +1100
  • Thread-topic: Specifying a file using only part of its name.

Title: Re: Specifying a file using only part of its name.
On 07/11/2005 14:17, "Brett Conlon" <email@hidden> wrote:

I'd like to improve it by either having the new version copied over to their desktop or at least have the newer script highlighted in the opened window.

I was going to adapt the below script I saw someone sent to this list recently but I realised that I'd have to target a file with a name I can't always guarantee, eg. property value for current script is "Create Packshots ALL 1.0.app" but the newer version on the server might be 1.5 or 2.0 etc.

 tell application "Finder"
  set a to alias "
RESOURCES:VIDEO/DVD COVERS:TEMPLATES:PShop Actions:Create Packshots ALL 1.0.app"
  make new finder window to a
 end tell

How do I target part of a file name, eg. "Create Packshots ALL", ignoring the rest of the file name to either have it selected in the opened window or copied to their desktop?

Try something like:

 tell application "Finder"
 set theWindow to make new finder window to alias "RESOURCES:VIDEO/DVD COVERS:TEMPLATES:PShop Actions:”
 select (every item of of theWindow whose name begins with “Create Packshots ALL”)
end tell

--
Matthew Smith
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Specifying a file using only part of its name. (From: Brett Conlon <email@hidden>)

  • Prev by Date: Re: Scripting Mail signatures in 10.4.3
  • Next by Date: Re: New FireFox 1.5 browser -- applescript implementation
  • Previous by thread: Specifying a file using only part of its name.
  • Next by thread: (no subject)
  • Index(es):
    • Date
    • Thread