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

Re: list issues


  • Subject: Re: list issues
  • From: Joshua Whalen <email@hidden>
  • Date: Wed, 24 Jun 2009 20:26:53 -0400

That worked beautifully (used the system events version) except:

I'm getting the full pathname of the file, when all I want is the filename. Anyway to get just the file name without a filtering subroutine?
I'm on the road, so I don't have my manuals and much of my code base along. otherwise I wouldn't bother you with that.


TIA! And thanks twice!

Joshua Whalen
email@hidden
email@hidden
http://www.panix.com/~joshua/resume.html
+1 (212) 457-9908 - home, voicemail
+1-646-299-8207 - cell
+1-747-665-1905 - SIP

"Vision without action is a day dream,
Action without vision is a nightmare."
-- Japanese proverb




On Jun 24, 2009, at 7:34 PM, Christopher Stone wrote:

On Jun 24, 2009, at 14:09, Joshua Whalen wrote:
set myfilelist to every item of ((list folder thefolder) whose name ends with ".html") as list
______________________________________________________________________

Hey Joshua,

Where you went wrong is 'list folder'.

 function syntax

set theResult to list folder file ¬
     invisibles boolean

List folder does not allow for a filter form.

set fold to path to desktop folder
tell application "System Events"
files of fold whose name extension is "html" and visible is true
end tell

Philip's script works fine.  You can do the same thing with the Finder:

tell application "Finder"
tell front window
(files whose name ends with ".html") as alias list
end tell
end tell

tell application "Finder"
tell front window
(files whose name extension is "html") as alias list
end tell
end tell

Applescript can occasionally be crazy-making.  :)

Best Regards,

Christopher Stone

 _______________________________________________
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: 
 >list issues (From: Joshua Whalen <email@hidden>)

  • Prev by Date: Re: list issues
  • Next by Date: Re: list issues Never mind!
  • Previous by thread: Re: list issues
  • Next by thread: Re: list issues Never mind!
  • Index(es):
    • Date
    • Thread