• 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 examine folder contents
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to examine folder contents


  • Subject: Re: How to examine folder contents
  • From: SemiColon <email@hidden>
  • Date: Thu, 4 Jan 2001 11:36:24 -0800

At 10:04 AM -0500 1/4/01, Stephen Gross wrote:
>Is there a way to find out the contents of a folder?
>
>Here's my problem:
>
>I'm writing an applescript to run on multiple machines. Every
>machine is guaranteed
>to have a folder called MASTERFOLDER. In that folder, however, will be one
>subfolder with a variable name. On some machines it might be called
>X, on others,
>Y. No matter what that sub-folder is called, there will be a
>SPECIALFILE in that
>subfolder that I want to get at. How can I select scan the contents of
>MASTERFOLDER, select the correct subfolder, then select SPECIALFILE
>from within
>MASTERFOLDER:subfolder?

If I understand correctly


set SUD to path to startup disk as string
tell application "Finder"
if (name of every folder of folder (SUD & "MASTERFOLDER:")) contains "x" then
open file SUD & "x:" & "SPECIALFILE"
else
if (name of every folder of folder (SUD & "MASTERFOLDER:")) contains "y" then
open file SUD & "x:" & "SPECIALFILE"
end if
end if
end tell

;


References: 
 >How to examine folder contents (From: "Stephen Gross" <email@hidden>)

  • Prev by Date: Re: [OFF] running out of steam...run out and scream!
  • Next by Date: Re: Identifying app by creator code??
  • Previous by thread: How to examine folder contents
  • Next by thread: Re: How to examine folder contents
  • Index(es):
    • Date
    • Thread