• 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: check a folder for folders and files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: check a folder for folders and files


  • Subject: Re: check a folder for folders and files
  • From: Andrew Oliver <email@hidden>
  • Date: Thu, 10 Mar 2005 10:46:18 -0800

On 3/10/05 8:10 AM, "Jan-Bultereys" <email@hidden> wrote:

> hi applescript friends,
>
> I am looking for the syntax to do:
>
> 1 - check a folder (look at the content)
> 2 - if there are folders (in this folder) do this......
> 3 - if there are files (in this folder) do that.....

I'm suspecting you really want a little more than what you say, but here
goes:

 tell application "Finder"
    set topFolder to (choose folder)
    if (count folders of folder topFolder) > 0 then
        my doThis()
    end if
    if (count files in folder topFolder) > 0 then
        my doThat()
    end if
end tell

Andrew
:)

 _______________________________________________
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: 
 >check a folder for folders and files (From: "Jan-Bultereys" <email@hidden>)

  • Prev by Date: Re: check a folder for folders and files
  • Next by Date: Re: check a folder for folders and files
  • Previous by thread: Re: check a folder for folders and files
  • Next by thread: Re: check a folder for folders and files
  • Index(es):
    • Date
    • Thread