Testing for a specific value in a folder name
Testing for a specific value in a folder name
- Subject: Testing for a specific value in a folder name
- From: Brett Conlon <email@hidden>
- Date: Wed, 5 Jul 2006 12:13:09 +1100
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....
on
run
set
aFolder to
choose folder
CheckDNum(aFolder)
end
run
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
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:
This email sent to email@hidden