Re: Periods in string after concatenating ?
Re: Periods in string after concatenating ?
- Subject: Re: Periods in string after concatenating ?
- From: Shane Stanley <email@hidden>
- Date: Mon, 30 Aug 2010 10:16:12 +1000
- Thread-topic: Periods in string after concatenating ?
On 30/8/10 9:35 AM, "Hernan" <email@hidden> wrote:
> set new_name to first text item of name_file as string
As well as what David said about saving and restoring text item delimiters,
this will give you the wrong result if you want to strip off an extension
and the file in question has another period in it. Better to do:
set new_name to text 1 thru text item -2 of name_file
And if there's any chance of getting a file that doesn't have an extension:
if name_file contains "." then
set new_name to text 1 thru text item -2 of name_file
else
set new_name to name_file
end if
--
Shane Stanley <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:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden