Re: Simple newbie question
Re: Simple newbie question
- Subject: Re: Simple newbie question
- From: Pat Cannon <email@hidden>
- Date: Thu, 18 Jun 2009 14:27:16 -0500
Oh dang, yeah, mine fails with no extension so it needs to check for
that. I am lame.
This is better but not as neat:
tell application "Finder"
set theItem to item 1 of (the selection as list)
if name extension of theItem is "" then
set baseName to (name of theItem)
else
set baseName to text 1 thru (-1 * ((length of ((name extension of
theItem) as text)) + 2)) of ((name of theItem) as text)
end if
end tell
Incidentally, running it on "foo.potrzebie" does give me "foo" (on
10.4.11). Will the registered extensions thing break my script in
10.5?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden