• 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: Multiple characteristics
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multiple characteristics


  • Subject: Re: Multiple characteristics
  • From: Philippe GRUCHET <email@hidden>
  • Date: Tue, 4 Feb 2003 08:32:43 +0100

From: Jeff Whitmill <email@hidden>

I'd like to be able to tell a script to look in a folder and select files whose names meet two criteria:

1) The name ends in ".log.txt"
2) The name contains "_200"

The attempt below doesn't work - how do I get it to look for filenames meeting both of two criteria?

You could try this, as example:

-- sos --
set {x, y} to {"_200", ".log.txt"}

tell application "Finder"
make new folder at desktop --with properties {name:{"myFolder"}}
set myFolderPath to result as alias
make at myFolderPath with properties {name:{"blah_200_blah.log.txt"}} new file
select (every file of folder myFolderPath whose name contains x and name ends with y)
open myFolderPath
end tell
-- eos --


Kind regards,
Philippe Gruchet/SVM Mac
VNU Publications France
http://svmmac.vnunet.fr
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Script Debugger: Erroneous error
  • Next by Date: Re: Adding an attachment to Entourage
  • Previous by thread: Multiple characteristics
  • Next by thread: Going crazy...
  • Index(es):
    • Date
    • Thread