• 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: Testing for a specific value in a folder name
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Testing for a specific value in a folder name


  • Subject: Re: Testing for a specific value in a folder name
  • From: Michelle Steiner <email@hidden>
  • Date: Tue, 4 Jul 2006 23:34:59 -0700


On Jul 4, 2006, at 6:13 PM, Brett Conlon wrote:

on CheckDNum(aFolder)

        tell application "Finder"

                set item_name to the name of aFolder as text

                set AppleScript's text item delimiters to " "

                set AllWords to every word of item_name as list

                log AllWords

                set Dnum to every word of AllWords whose character 1 is 

"D"

        end tell

end CheckDNum


on CheckDNum(aFolder)
tell application "Finder"
set item_name to name of aFolder --the name of aFolder
repeat with this_word in words of item_name
considering case
if contents of this_word begins with "D" then
try
return text 2 through end of this_word as integer
end try
end if
end considering
end repeat
end tell
end CheckDNum

-- 
"The optimist proclaims that this is the best of all possible worlds ;
and the pessimist fears this is true."  --James Branch Cabell

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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: 
 >Testing for a specific value in a folder name (From: Brett Conlon <email@hidden>)

  • Prev by Date: Re: Testing for a specific value in a folder name
  • Next by Date: Re: Testing for a specific value in a folder name
  • Previous by thread: Re: Testing for a specific value in a folder name
  • Next by thread: Re: Testing for a specific value in a folder name
  • Index(es):
    • Date
    • Thread