• 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: Adam Bell <email@hidden>
  • Date: Wed, 05 Jul 2006 00:50:37 -0300
  • Comment:

Title: Re: Testing for a specific value in a folder name
At 12:13 PM +1100 7/5/06, Brett Conlon wrote:
Hiya,

I have a word list  (taked from a folder name) and I want to test for a spoecific word in it. The folder name goes like this:

21 Move Title D12345 33 41 BC

I want to test if the D number is present. So far I've coerced the name to a word list but I can't get the syntax to find a word beginning with D and has numbers after it. The D number is not alwats 5 characters either - older jobs had 4 characters.

Later I want to use this to check that the construction file (Quark/Freehand etc) they have in that job folder has the same D Number.

Here's what I have so far but the last line errors....

More like this, I think:
set aFolder to (choose folder)
set D to CheckDNum(aFolder)
to CheckDNum(F)
    tell application "Finder"
        set N to name of F
        set w to words of N
        repeat with aW in w
            if first character of aW is "D" then return rest of characters of aW as string as integer
       end repeat
    end tell
end CheckDNum


Many thanks,

Coj

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
>esscable.net

This email sent to email@hidden

 _______________________________________________
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