• 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 list folder contents and show only certain file types ...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to list folder contents and show only certain file types ...


  • Subject: Re: How to list folder contents and show only certain file types ...
  • From: Michelle Steiner <email@hidden>
  • Date: Mon, 2 Jun 2003 09:33:10 -0700

On Monday, June 2, 2003, at 09:03 AM, Charles Heizer wrote:

I'm trying to list the contents of a folder which I can do successfully, but what I really want to show is only the files which contain .jpg and .gif file extensions. I can not seem to get it to work. Does anyone have an example of this they would be willing to share?

I don't have any gifs handy, so here's a way to to it with picts; just change the file type in the code.

set the fileList to {}
set foo to alias "Dora:Graphics:Misc:"
tell application "Finder"
set the fileList to the fileList & ((files of foo whose file type is "jpeg"))
set the fileList to the fileList & ((files of foo whose file type is "pict"))
end tell
the fileList

--Michelle

--
Never play strip Tarot.
_______________________________________________
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.

References: 
 >How to list folder contents and show only certain file types ... (From: Charles Heizer <email@hidden>)

  • Prev by Date: Re: How to list folder contents and show only certain file types ...
  • Next by Date: Re: Error -1762
  • Previous by thread: Re: How to list folder contents and show only certain file types ...
  • Next by thread: Re: How to list folder contents and show only certain file types ...
  • Index(es):
    • Date
    • Thread