Re: How to examine folder contents
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
;